From: Web Access Date: Fri, 10 Jul 2015 13:16:29 +0000 (+0530) Subject: Webtest Fix-Master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a7011f01ca10e99f92d4a47fc584b899b7b6f456;p=civicrm-core.git Webtest Fix-Master --- diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index 93821cb6b2..41b90aacd4 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -1357,7 +1357,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text); $this->openCiviPage("admin/contribute", "reset=1"); $this->waitForAjaxContent(); - $this->click("xpath=//table['dataTables_wrapper no-footer']/tbody//tr/td[1]/strong[text()='$pageTitle']/../../td[5]/div[1]/span/ul/li[8]/a[text()='Premiums']"); + $this->click("xpath=//table['dataTables_wrapper no-footer']/tbody//tr/td[1]/strong[text()='$pageTitle']/../../td[4]/div[1]/span/ul/li[8]/a[text()='Premiums']"); $this->waitForElementPresent('_qf_Premium_cancel-bottom'); $this->click("xpath=//div[@class='messages status no-popup']/a[text()='add one']"); $this->waitForElementPresent('_qf_AddProduct_cancel-bottom'); diff --git a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php index 8a9a7258dc..1d6f1b1ef6 100644 --- a/tests/phpunit/WebTest/Case/ActivityToCaseTest.php +++ b/tests/phpunit/WebTest/Case/ActivityToCaseTest.php @@ -180,7 +180,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase { $this->clickAjaxLink('_qf_Activity_upload-bottom'); $id = $this->urlArg('id'); $this->waitForText("case_id_$id", $activitySubject); - $this->click("xpath=//a[contains(text(),'$activitySubject')]"); + $this->click("xpath=//table[@id='case_id_{$id}']/tbody//tr/td[2]/div[text()='{$activitySubject}']/../../td[8]/a[text()='View']"); $LinkCaseActivityData = array( "Client" => $contact2['first_name'], diff --git a/tests/phpunit/WebTest/Case/AddCaseTest.php b/tests/phpunit/WebTest/Case/AddCaseTest.php index a2e2b94303..9dee93c265 100644 --- a/tests/phpunit/WebTest/Case/AddCaseTest.php +++ b/tests/phpunit/WebTest/Case/AddCaseTest.php @@ -219,7 +219,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase { // check that open case subject is present $this->assertText("case_id_$id", $subject); // click open case activity pop-up dialog - $this->click("link=$subject"); + $this->click("xpath=//table[@id='case_id_{$id}']/tbody//tr/td[2]/div[text()='{$subject}']/../../td[8]/a[text()='View']"); $this->waitForElementPresent("ActivityView"); $this->waitForElementPresent("css=tr.crm-case-activity-view-Activity"); // set page location of table containing activity view data diff --git a/tests/phpunit/WebTest/Contact/AddTest.php b/tests/phpunit/WebTest/Contact/AddTest.php index 2b01189ded..2d2ab76027 100644 --- a/tests/phpunit/WebTest/Contact/AddTest.php +++ b/tests/phpunit/WebTest/Contact/AddTest.php @@ -149,7 +149,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase { $this->waitForElementPresent("subject"); $this->type("subject", "test note"); $this->type("note", "this is a test note contact webtest"); - $this->assertElementContainsText('notesBlock', "Subject\n Notes"); + $this->assertElementContainsText('notesBlock', "Subject\n Note"); //Demographics section $this->click("//div[@class='crm-accordion-header' and contains(.,'Demographics')]"); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index c6c7a4a387..e51209ed78 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -148,7 +148,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { // Click View action link on associated contribution record $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']"); $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']"); - $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]"); + $this->waitForElementPresent("_qf_ContributionView_cancel-bottom"); //View Contribution Record $verifyData = array( 'From' => $firstName . ' ' . $lastName,