From: Web Access Date: Mon, 6 Jul 2015 14:22:58 +0000 (+0530) Subject: Webtests fix for master X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=94b3c2907780525931240a054d340a5d51bdc59d;p=civicrm-core.git Webtests fix for master --- diff --git a/tests/phpunit/WebTest/Campaign/MembershipTest.php b/tests/phpunit/WebTest/Campaign/MembershipTest.php index 97976b89fd..5f75370825 100644 --- a/tests/phpunit/WebTest/Campaign/MembershipTest.php +++ b/tests/phpunit/WebTest/Campaign/MembershipTest.php @@ -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)); diff --git a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php index a7c080cdc0..35616e9843 100644 --- a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php +++ b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php @@ -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); diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index 78fc7d0b79..045ce44b7d 100755 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -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'"); diff --git a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php index ac8bc476a3..ccb164e537 100644 --- a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php @@ -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(