From: Rohan Katkar Date: Mon, 20 Oct 2014 11:00:06 +0000 (+0530) Subject: Webtest fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d25d8bbffcea65ed9a4d61af0f557286c92000e5;p=civicrm-core.git Webtest fix --- diff --git a/tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php b/tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php index f4ffb86429..e4fb42d8d0 100644 --- a/tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php +++ b/tests/phpunit/WebTest/Campaign/PetitionUsageScenarioTest.php @@ -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 diff --git a/tests/phpunit/WebTest/Event/PCPAddTest.php b/tests/phpunit/WebTest/Event/PCPAddTest.php index 768ee32737..1a96a1a4cc 100644 --- a/tests/phpunit/WebTest/Event/PCPAddTest.php +++ b/tests/phpunit/WebTest/Event/PCPAddTest.php @@ -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()); diff --git a/tests/phpunit/WebTest/Report/LoggingReportTest.php b/tests/phpunit/WebTest/Report/LoggingReportTest.php index 9713d23656..5ce5c1938b 100644 --- a/tests/phpunit/WebTest/Report/LoggingReportTest.php +++ b/tests/phpunit/WebTest/Report/LoggingReportTest.php @@ -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");