webtest fix
authorWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 14 Apr 2015 13:06:36 +0000 (18:36 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 14 Apr 2015 13:06:36 +0000 (18:36 +0530)
tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index 19586eeee11b9984f8c3b1942094e90e3a1e93ea..f956f6fe5fab26494f722ea8902f9faeec6ebb40 100644 (file)
@@ -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)");
index 626c2adc19dad3bbc4b7c5a974782bc6cd65771d..7b6e0d357a6e6857fc20a7ec45b494c6c44436ed 100644 (file)
@@ -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");