Fixed webtest
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 7 Oct 2014 13:46:01 +0000 (19:16 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 7 Oct 2014 13:46:01 +0000 (19:16 +0530)
tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php
tests/phpunit/WebTest/Campaign/ActivityTest.php
tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php

index 055ebcb769f56419e851e4b782eda00850329694..e58b5c17448042e0c2996766b9bb8709ae665d60 100644 (file)
@@ -74,7 +74,7 @@ class WebTest_Admin_RelationshipTypeAddTest extends CiviSeleniumTestCase {
       'Contact Type B' => 'Individual',
     );
     foreach ($data as $param => $val) {
-      $this->assertElementContainsText('option11', $val, "Could not able to save $param");
+      $this->assertElementContainsText("xpath=//table[@class='display dataTable no-footer']", $val, "Could not able to save $param");
     }
   }
 
index 78a9f1762a9a6d44464298231dfc0ed3b905e030..47cc062d5e562d87da41dd01cb5e85c23c4fc14a 100644 (file)
@@ -200,10 +200,10 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase {
     // 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->waitForElementPresent('_qf_Activity_cancel-bottom');
-    $this->waitForElementPresent("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span");
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]");
 
     // verify Activity created
-    $this->verifyText("xpath=id('Activity')/div[2]/table[1]/tbody/tr[5]/td[2]/span", $campaignTitle);
+    $this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle);
   }
 }
 
index 74e6c266a44e2e0fa3db58c69aad14fb3dcbaee5..e1c573dfa05de9e51136418a90e55a87528b1525 100644 (file)
@@ -299,7 +299,6 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
     $this->waitForElementPresent("event_type_id");
     $this->select2("event_type_id", "Conference");
     $this->click("_qf_Advanced_refresh");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->waitForElementPresent('search-status');
     $this->assertElementContainsText('search-status', '2 Contacts');
   }
index b0a70870d97a1f24d6cbe369eb8b61c615235aef..c958539a756b8e81f85981e5ea812d4c783399b8 100644 (file)
@@ -601,8 +601,9 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
 
     // Select an event fee
     $this->waitForElementPresent("xpath=//div[@id='priceset']/div[2]/div[2]");
-    $this->type("//div[@id='priceset']/div[2]/div[2]/input", '5');
-    $this->fireEvent("//div[@id='priceset']/div[2]/div[2]/input", 'blur');
+    $this->type("xpath=//div[@id='priceset']/div[2]/div[2]/input", '5');
+    $this->fireEvent("xpath=//div[@id='priceset']/div[2]/div[2]/input", 'blur');
+    $this->waitForElementPresent("xpath=//div[@id='priceset']/div[3]/div[2]/div[1]/span/input");
     $this->click("xpath=//div[@id='priceset']/div[3]/div[2]/div[1]/span/input");
     $this->click("xpath=//div[@id='priceset']/div[4]/div[2]/div[1]/span/input");
     $this->click("xpath=//div[@id='priceset']/div[4]/div[2]/div[2]/span/input");