Webtest Fix
authorWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 9 Apr 2015 14:50:44 +0000 (20:20 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Thu, 9 Apr 2015 14:50:44 +0000 (20:20 +0530)
tests/phpunit/WebTest/Campaign/ActivityTest.php
tests/phpunit/WebTest/Event/ParticipantCountTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index 8cf5cf519d8b7fb079e2623ebd3531672262fc26..2d01e2d7b5a5c383492cff4c864165484abc29ce 100644 (file)
@@ -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);
   }
 
 }
index fec92e8d11cea0780182822d0ef726f75d2e1f60..6532c6cf90656d35c4b0f9bf72dfee1930b512da 100644 (file)
@@ -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() {
index 3b1c019a7888388aba64bafd8e081e12622ac3c7..5935899334a7277d632acc9b67dee4a8a1366ef4 100644 (file)
@@ -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')]");
 
index 3920f288a25b5cc7912bb08d8699f54928ff7d7f..626c2adc19dad3bbc4b7c5a974782bc6cd65771d 100644 (file)
@@ -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");