Webtests fix for master
authorWeb Access <rohan.katkar@webaccessglobal.com>
Mon, 6 Jul 2015 14:22:58 +0000 (19:52 +0530)
committerWeb Access <rohan.katkar@webaccessglobal.com>
Mon, 6 Jul 2015 14:22:58 +0000 (19:52 +0530)
tests/phpunit/WebTest/Campaign/MembershipTest.php
tests/phpunit/WebTest/Contact/SearchBuilderTest.php
tests/phpunit/WebTest/Contribute/UpdateContributionTest.php
tests/phpunit/WebTest/Event/ParticipantSearchTest.php

index 97976b89fdaa0fccd692f1a3aa742808e012560e..5f753708256245fd33b728554addc60cf730f78e 100644 (file)
@@ -53,6 +53,7 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("group_id");
 
     // add to group
+    $this->waitForElementPresent("group_id");
     $this->select("group_id", "label=$groupName");
     $this->click("_qf_GroupContact_next");
     $this->waitForElementPresent('link=Remove');
@@ -162,7 +163,7 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
     );
 
     // click through to the membership view screen
-    $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
+    $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]//span/a[text()='View']");
     $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
 
     $this->webtestVerifyTabularData(array('Campaign' => $campaignTitle));
index a7c080cdc020acf8a275d4a5da8a599febbe0261..35616e9843c65e0d0030477f755bf2400c37c6fd 100644 (file)
@@ -68,7 +68,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $sortName = "adv$firstName, $firstName";
     $displayName = "$firstName adv$firstName";
 
-    $this->_searchBuilder("Postal Code", "100[0-9]", $sortName, "RLIKE");
+    $this->_searchBuilder("ZIP / Postal Code", "100[0-9]", $sortName, "RLIKE");
   }
 
   /**
@@ -198,7 +198,7 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase {
     $this->_createContact('Household', $firstName7, "$firstName7@advsearch.co.in", NULL, $postalCode);
 
     // check if the resultset of search builder and advanced search match for the postal code
-    $this->_searchBuilder('Postal Code', $postalCode, NULL, 'LIKE', '4');
+    $this->_searchBuilder('ZIP / Postal Code', $postalCode, NULL, 'LIKE', '4');
     $this->_advancedSearch($postalCode, NULL, NULL, '4', 'postal_code');
 
     $firstName8 = "abcc" . substr(sha1(rand()), 0, 7);
index 78fc7d0b79804affe7f45ef21d7330c57f6f15b8..045ce44b7d58cd7d58e2c96f1ef9143bffa6038e 100755 (executable)
@@ -240,7 +240,8 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("product_name_0");
     $this->select('product_name_0', "value=0");
     // Clicking save.
-    $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[7][not(text())]", FALSE);
+    $this->click("_qf_Contribution_upload");
+    $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]//span/a[text()='View']");
 
     //Assertions
     $actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'");
index ac8bc476a362f1e3db7ed9ebe89b81ae814c2a0a..ccb164e5376c20e24ee8f249d776dac86ce2cce6 100644 (file)
@@ -242,7 +242,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
 
     $this->waitForElementPresent("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='Edit']");
     $this->click("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='Edit']");
-    $this->waitForTextPresent("Edit Event Registration");
+    $this->waitForElementPresent("xpath=//button//span[contains(text(),'Save')]");
 
     // ensure we get to particpant view
     $stringsToCheck = array(