From: Web Access Date: Thu, 9 Apr 2015 14:50:44 +0000 (+0530) Subject: Webtest Fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=371f954cfd6d831d47eb9526bfe1aa3a8de7c4c4;p=civicrm-core.git Webtest Fix --- diff --git a/tests/phpunit/WebTest/Campaign/ActivityTest.php b/tests/phpunit/WebTest/Campaign/ActivityTest.php index 8cf5cf519d..2d01e2d7b5 100644 --- a/tests/phpunit/WebTest/Campaign/ActivityTest.php +++ b/tests/phpunit/WebTest/Campaign/ActivityTest.php @@ -202,7 +202,7 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase { $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]"); // verify Activity created - $this->verifyText("xpath=//form[@id='Activity']//div/table/tbody/tr[5]/td[2]/span", $campaignTitle); + $this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle); } } diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index fec92e8d11..6532c6cf90 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -106,7 +106,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // verify number of registered participants - $this->assertElementContainsText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td", '2 Results'); + $this->assertElementContainsText("xpath=//div[@class='crm-block crm-content-block']/div//div/div/table/tbody/tr[1]/td", '2 Results'); } public function testParticipantCountWithPriceset() { diff --git a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php index 3b1c019a78..5935899334 100644 --- a/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php @@ -95,10 +95,10 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase { // page was loaded $this->waitForTextPresent($sourceText); - $this->waitForElementPresent("xpath=//div[@id='memberships']/div//table//tbody/tr/td[9]/span[1]/a[1][contains(text(),'View')]"); + $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table[@class='display dataTable no-footer']/tbody/tr/td[9]/span[1]/a[1][contains(text(),'View')]"); // click through to the membership view screen - $this->click("xpath=//div[@id='memberships']/div//table//tbody/tr/td[9]/span[1]/a[1][contains(text(),'View')]"); + $this->click("xpath=//div[@id='memberships']/div/table[@class='display dataTable no-footer']/tbody/tr/td[9]/span[1]/a[1][contains(text(),'View')]"); $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]"); diff --git a/tests/phpunit/WebTest/Report/LoggingReportTest.php b/tests/phpunit/WebTest/Report/LoggingReportTest.php index 3920f288a2..626c2adc19 100644 --- a/tests/phpunit/WebTest/Report/LoggingReportTest.php +++ b/tests/phpunit/WebTest/Report/LoggingReportTest.php @@ -61,7 +61,7 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { // Because it tends to cause problems, all uses of sleep() must be justified in comments // Sleep should never be used for wait for anything to load from the server // Justification for this instance: FIXME - sleep(3); + $this->waitForElementPresent("group_id"); $this->select("group_id", "label=Case Resources"); $this->click("_qf_GroupContact_next"); $this->waitForElementPresent("xpath=//form[@id='GroupContact']//div[@class='view-content view-contact-groups']//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[4]/a"); @@ -164,8 +164,8 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { $this->type('activity_subject', "subject" . rand()); $this->select('case_type_id', 'value=1'); $this->click('_qf_Case_upload-bottom'); - $this->waitForElementPresent("xpath=//form[@id='Search']/div[2]/div/table/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']"); - $this->click("xpath=//form[@id='Search']/div[2]/div/table/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']"); + $this->waitForElementPresent("xpath=//table[@class='caseSelector']/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']"); + $this->click("xpath=//table[@class='caseSelector']/tbody/tr[2]/td[9]/span[1]/a[1][text()='Manage']"); $this->waitForElementPresent("xpath=//form[@id='CaseView']/div[2]/table/tbody/tr/td[4]/a"); $this->click("xpath=//form[@id='CaseView']/div[2]/table/tbody/tr/td[4]/a"); $this->waitForElementPresent("_qf_Activity_cancel-bottom");