Webtest fix
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Mon, 20 Oct 2014 11:00:06 +0000 (16:30 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Mon, 20 Oct 2014 11:00:06 +0000 (16:30 +0530)
tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php
tests/phpunit/WebTest/Event/PCPAddTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index f4ffb864293aa0cfdbf93d98d076ef35c5e47de0..e4fb42d8d0ec02821c2d445e776234ed81f278b1 100644 (file)
@@ -253,8 +253,8 @@ class WebTest_Campaign_PetitionUsageScenarioTest extends CiviSeleniumTestCase {
     $this->type("petition_title", $title);
     $this->click("xpath=//div[@class='crm-accordion-body']/table/tbody/tr[2]/td/a[text()='Search']");
 
-    $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[10]/span[2][text()='more']");
-    $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[10]/span[2][text()='more']/ul/li[3]/a[text()='Signatures']");
+    $this->waitForElementPresent("xpath=//table[@class='petitions dataTable no-footer']/tbody/tr/td[10]/span[2][text()='more']");
+    $this->click("xpath=//table[@class='petitions dataTable no-footer']/tbody/tr/td[10]/span[2][text()='more']/ul/li[3]/a[text()='Signatures']");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // verify tabular data
index 768ee327378ac07dac1bc73ecad87c821354602f..1a96a1a4cc74231ab55004e9b686212b06591624 100644 (file)
@@ -362,7 +362,7 @@ class WebTest_Event_PCPAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_PCP_refresh");
     $id = explode('id=', $this->getAttribute("xpath=//div[@id='option11_wrapper']/table[@id='option11']/tbody//tr/td/a[text()='$pcpTitle']@href"));
     $pcpUrl = "civicrm/pcp/info?reset=1&id=$id[1]";
-    $this->click("xpath=//div[@id='option11_wrapper']/table[@id='option11']/tbody//tr/td/a[text()='$pcpTitle']/../../td[7]/span/a[text()='Approve']");
+    $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td/a[text()='$pcpTitle']/../../td[7]/span[1]/a[2][text()='Approve']");
 
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
index 9713d236566314eb5fd710796f85ed15013bcdc7..5ce5c1938bb68ddccb5d515e0be5261e386f07b8 100644 (file)
@@ -156,6 +156,7 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr/td[7][text()='Completed']");
 
     //add a case
+    $this->waitForAjaxContent();
     $this->click("xpath=//li[@id='tab_case']/a");
     $this->waitForElementPresent("xpath=//div[@class='view-content']//div[@class='action-link']/a");
     $this->click("xpath=//div[@class='view-content']//div[@class='action-link']/a");