X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FCase%2FActivityToCaseTest.php;h=9233a8acce79a12af97f4ef02be5fad700878d90;hb=42daf119777cf8b9cb501c44348c76a59382b40c;hp=512a2a2b9db7cc427bfc47a32939c57f40b1bcc7;hpb=3cf233b8cad8e94de3242055962c5d218a48bed4;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php index 512a2a2b9d..9233a8acce 100644 --- a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php +++ b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php @@ -33,10 +33,8 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { } function testAddActivityToCase() { - $this->open($this->sboxPath); - // Log in as admin first to verify permissions for CiviCase - $this->webtestLogin(); + $this->webtestLogin('true'); // Enable CiviCase module if necessary $this->enableComponents("CiviCase"); @@ -45,7 +43,9 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { $permission = array('edit-2-access-all-cases-and-activities', 'edit-2-access-my-cases-and-activities', 'edit-2-administer-civicase', 'edit-2-delete-in-civicase'); $this->changePermissions($permission); - // Go directly to the URL of the screen that you will be testing (New Case-standalone). + // Log in as normal user + $this->webtestLogin(); + $this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom'); // Adding contact with randomized first name (so we can then select that contact when creating case) @@ -98,7 +98,6 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { $firstName2 = substr(sha1(rand()), 0, 7); $this->webtestAddContact($firstName2, "Anderson", $firstName2 . "@anderson.name"); - // Go directly to the URL of the screen that you will be testing (Activity Tab). $this->click("css=li#tab_activity a"); // waiting for the activity dropdown to show up @@ -111,7 +110,6 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { // button at the end of this page to show up, to make sure it's fully loaded. $this->waitForElementPresent("_qf_Activity_upload-bottom"); - // Let's start filling the form with values. // ...and verifying if the page contains properly formatted display name for chosen contact. $this->assertElementContainsText('css=tr.crm-activity-form-block-target_contact_id td ul li.token-input-token-facebook', 'Anderson, ' . $firstName2, "Contact not found in line " . __LINE__); @@ -233,7 +231,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { } function _addCustomData($customGroupTitle) { - // Go directly to the URL of the screen that you will be testing (New Custom Group). + $this->openCiviPage('admin/custom/group', 'reset=1'); //add new custom data