From: Ravish Nair Date: Thu, 18 Apr 2013 14:38:35 +0000 (+0530) Subject: -- webtest fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f4c17a3c2cc5dd68d759f83784161186221b1c63;p=civicrm-core.git -- webtest fix --- diff --git a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php index a39d7610e2..9f61937d82 100644 --- a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php +++ b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php @@ -400,8 +400,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->click('CIVICRM_QFID_ts_all_4'); $this->click('Go'); $this->waitForElementPresent('_qf_Reserve_next_reserveToInterview-top'); - $this->click('_qf_Reserve_next_reserveToInterview-top'); - $this->waitForElementPresent('_qf_Interview_cancel_interview'); + $this->clickLink('_qf_Reserve_next_reserveToInterview-top', '_qf_Interview_cancel_interview'); $this->isElementPresent("xpath=//table[@id='voterRecords']/tbody//tr/td[text()='{$Name2}']"); $this->isElementPresent("xpath=//table[@id='voterRecords']/tbody//tr/td[text()='{$Name1}']"); diff --git a/tests/phpunit/WebTest/Report/LoggingReportTest.php b/tests/phpunit/WebTest/Report/LoggingReportTest.php index e67250d4fe..ff0d611537 100644 --- a/tests/phpunit/WebTest/Report/LoggingReportTest.php +++ b/tests/phpunit/WebTest/Report/LoggingReportTest.php @@ -104,9 +104,8 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { $this->waitForElementPresent("_qf_Note_upload-top"); $this->type('subject', $noteSubject . "_edited"); $this->type('note', $noteText . "_edited"); - $this->click("_qf_Note_upload-top"); + $this->clickLink("_qf_Note_upload-top", "xpath=//div[@class='crm-results-block']/div[@id='notes']/div/table/tbody/tr//td/span[2]/ul/li[2]/a[text()='Delete']"); - $this->waitForElementPresent("xpath=//div[@class='crm-results-block']/div[@id='notes']/div/table/tbody/tr//td/span[2]/ul/li[2]/a[text()='Delete']"); $this->click("xpath=//div[@class='crm-results-block']/div[@id='notes']/div/table/tbody/tr//td/span[2]/ul/li[2]/a[text()='Delete']"); // Check confirmation alert. $this->assertTrue((bool)preg_match("/^Are you sure you want to delete this note/",