From 3d4f16dea40ab847c33e3d42839baf1c9fd0e93b Mon Sep 17 00:00:00 2001 From: Web Access Date: Tue, 14 Apr 2015 18:36:36 +0530 Subject: [PATCH] webtest fix --- .../WebTest/Generic/GeneralClickAroundTest.php | 2 +- tests/phpunit/WebTest/Report/LoggingReportTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php index 19586eeee1..f956f6fe5f 100644 --- a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php +++ b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php @@ -346,7 +346,7 @@ class WebTest_Generic_GeneralClickAroundTest extends CiviSeleniumTestCase { $this->clickLink("xpath=//div[@id='root-menu-div']//a[text()='Message Templates']"); // Verify message templates - $this->click("//a[contains(text(),'System Workflow Messages')]"); + $this->click("xpath=//div[@id='mainTabContainer']/ul//li/a[contains(text(),'System Workflow Messages')]"); $this->assertTextPresent("Contributions - Receipt (on-line)"); $this->assertTextPresent("Events - Registration Confirmation and Receipt (off-line)"); $this->assertTextPresent("Memberships - Signup and Renewal Receipts (off-line)"); diff --git a/tests/phpunit/WebTest/Report/LoggingReportTest.php b/tests/phpunit/WebTest/Report/LoggingReportTest.php index 626c2adc19..7b6e0d357a 100644 --- a/tests/phpunit/WebTest/Report/LoggingReportTest.php +++ b/tests/phpunit/WebTest/Report/LoggingReportTest.php @@ -147,8 +147,8 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { $this->select("other_activity", "label=Interview"); $this->waitForElementPresent("_qf_Activity_cancel-bottom"); $this->click('_qf_Activity_upload-bottom'); - $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr/td[8]/span/a[2]"); - $this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr/td[8]/span/a[2]"); + $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr//td//span/a[text()='Edit']"); + $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr//td//span/a[text()='Edit']"); $this->waitForElementPresent("_qf_Activity_cancel-bottom"); $this->select("status_id", "value=2"); $this->click('_qf_Activity_upload-bottom'); @@ -158,14 +158,14 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase { //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"); + $this->waitForElementPresent("xpath=//form[@id='Search']//div/div//div[@class='action-link']/a"); + $this->click("xpath=//form[@id='Search']//div/div//div[@class='action-link']/a"); $this->waitForElementPresent("_qf_Case_cancel-bottom"); $this->type('activity_subject', "subject" . rand()); $this->select('case_type_id', 'value=1'); $this->click('_qf_Case_upload-bottom'); - $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=//table[@class='caseSelector']/tbody//tr/td[9]//span/a[text()='Manage']"); + $this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[9]//span/a[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"); -- 2.25.1