Webtest Fix
authorWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 12 May 2015 14:10:46 +0000 (19:40 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Tue, 12 May 2015 14:10:46 +0000 (19:40 +0530)
tests/phpunit/WebTest/Activity/ContactContextAddTest.php
tests/phpunit/WebTest/Campaign/ActivityTest.php
tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php
tests/phpunit/WebTest/Contact/RelationshipAddTest.php
tests/phpunit/WebTest/Contact/TagAddTest.php
tests/phpunit/WebTest/Contact/TagSetSearchTest.php
tests/phpunit/WebTest/Report/LoggingReportTest.php

index 935696720c694aecb1efd0e39936bb505e6f7c76..a845942b7504974c9b6c7f784e85f43fd517a472 100644 (file)
@@ -117,11 +117,10 @@ class WebTest_Activity_ContactContextAddTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->waitForText('crm-notification-container', $subject);
 
-    $this->waitForElementPresent(
-      "xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']//tbody//tr[2]/td[8]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//div[@class='crm-activity-selector-activity']/div[2]/table/tbody/tr[2]/td[8]/span[1]/a[1][text()='View']");
 
     // click through to the Activity view screen
-    $this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']//tbody//tr[2]/td[8]/span/a[text()='View']");
+    $this->click("xpath=//div[@class='crm-activity-selector-activity']/div[2]/table/tbody/tr[2]/td[8]/span[1]/a[1][text()='View']");
     $this->waitForElementPresent('_qf_Activity_cancel-bottom');
 
     // verify Activity created
index 2d01e2d7b5a5c383492cff4c864165484abc29ce..26f2de9ec53ce9de20ce7f0f54d843261f594972 100644 (file)
@@ -195,10 +195,10 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase {
     // Is status message correct?
     $this->waitForText('crm-notification-container', $subject);
 
-    $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
+    $this->waitForElementPresent("xpath=//div[@class='crm-activity-selector-activity']/div[2]/table/tbody/tr[2]/td[8]/span[1]/a[1][text()='View']");
 
     // click through to the Activity view screen
-    $this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr[2]/td[8]/span/a[text()='View']");
+    $this->click("xpath=//div[@class='crm-activity-selector-activity']/div[2]/table/tbody/tr[2]/td[8]/span[1]/a[1][text()='View']");
     $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]");
 
     // verify Activity created
index 011e388453f9082b1b9308c9d5c877be528019bd..ba277039b28fb5e83cac9740db44c66c6b221ece 100644 (file)
@@ -92,10 +92,10 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
     $this->openCiviPage('contact/search', 'reset=1', '_qf_Basic_refresh');
     $this->type("sort_name", $sortName);
     $this->select("contact_type", "value=Individual");
-    $this->clickLink("_qf_Basic_refresh", "xpath=//form[@id='Basic']/div[3]/div/div[2]/table/tbody/tr/");
+    $this->clickLink("_qf_Basic_refresh", "xpath=//form[@id='Basic']//div/div//div/table/tbody/tr/");
 
     // click through to the Relationship view screen
-    $this->click("xpath=//form[@id='Basic']/div[3]/div/div[2]/table/tbody/tr/td[11]/span/a[text()='View']");
+    $this->click("xpath=//form[@id='Basic']//div/div//div/table/tbody/tr/td[11]/span/a[text()='View']");
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->click("css=li#tab_participant a");
 
index 5d190d87bc61ccc40745527add9997be22df87bf..23f1d3c7f05bc9a063b4b7281cf9c1149c5cff4b 100644 (file)
@@ -337,8 +337,8 @@ class WebTest_Contact_RelationshipAddTest extends CiviSeleniumTestCase {
     //check the status message
     $this->waitForText('crm-notification-container', 'Relationship created.');
 
-    $this->waitForElementPresent("xpath=//table[@class='crm-contact-relationship-selector-current dataTable no-footer']/tbody/tr/td[9]/span/a[1][text()='View']");
-    $this->click("xpath=//table[@class='crm-contact-relationship-selector-current dataTable no-footer']/tbody/tr/td[9]/span/a[1][text()='View']");
+    $this->waitForElementPresent("xpath=//div[@id='contact-summary-relationship-tab']/div[2]/div[1]/table/tbody/tr/td[9]/span[1]/a[1]");
+    $this->click("xpath=//div[@id='contact-summary-relationship-tab']/div[2]/div[1]/table/tbody/tr/td[9]/span[1]/a[1]");
 
     $this->webtestVerifyTabularData(
       array(
index 0bcf025bc202332e749b01147bb18e1e871b1da0..92bcba58c5b546b5517a045380555a045c98802a 100644 (file)
@@ -63,7 +63,7 @@ class WebTest_Contact_TagAddTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("The tag '$tagName' has been saved."));
 
     // sort by ID desc
-    $this->click("xpath=//table//tr/th[text()=\"ID\"]");
+    $this->click("xpath=//div[@id='cat']/div/table/thead/tr/th[2]/div[text()='ID']");
     $this->waitForElementPresent("css=table.display tbody tr td");
 
     // verify text
@@ -101,7 +101,7 @@ class WebTest_Contact_TagAddTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("The tag '$tagSetName' has been saved."));
 
     // sort by ID desc
-    $this->click("xpath=//table//tr/th[text()=\"ID\"]");
+    $this->click("xpath=//div[@id='cat']/div/table/thead/tr/th[2]/div[text()='ID']");
     $this->waitForElementPresent("css=table.display tbody tr td");
 
     // verify text
index 82a1dee04b7b75d9c138e59c56ca45d9398578ff..d09acb8230031b9e330a201502664cbf65b66b7d 100644 (file)
@@ -144,7 +144,7 @@ class WebTest_Contact_TagSetSearchTest extends CiviSeleniumTestCase {
     $this->waitForText('crm-notification-container', "The tag '$tagSetName' has been saved.");
 
     // sort by ID desc
-    $this->click("xpath=//table//tr/th[text()=\"ID\"]");
+    $this->click("xpath=//div[@id='cat']/div/table/thead/tr/th[2]/div[text()='ID']");
     $this->waitForElementPresent("css=table.display tbody tr td");
 
     // verify text
index 7b6e0d357a6e6857fc20a7ec45b494c6c44436ed..903cd4299b9bedafc2e0c40ff01f9be915e57234 100644 (file)
@@ -151,12 +151,13 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase {
     $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->waitForAjaxContent();
     $this->click('_qf_Activity_upload-bottom');
     $this->waitForText("crm-notification-container", "Activity has been saved.");
-    $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr/td[7][text()='Completed']");
+    $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[7]/div");
+    $this->verifyText("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[7]/div", 'Completed');
 
     //add a case
-    $this->waitForAjaxContent();
     $this->click("xpath=//li[@id='tab_case']/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");
@@ -164,8 +165,8 @@ class WebTest_Report_LoggingReportTest extends CiviSeleniumTestCase {
     $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/td[9]//span/a[text()='Manage']");
-    $this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[9]//span/a[text()='Manage']");
+    $this->waitForElementPresent("xpath=//table[@class='caseSelector']/tbody//tr/td[9]//span/a[1][text()='Manage']");
+    $this->click("xpath=//table[@class='caseSelector']/tbody//tr/td[9]//span/a[1][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");