From 377afa394ec984d8258a9075c555f65a7572f2bf Mon Sep 17 00:00:00 2001 From: Ravish Nair Date: Wed, 15 May 2013 11:58:33 +0530 Subject: [PATCH] -- webtest-fix related to issue CRM-12397 and fix for other failing tests --- tests/phpunit/WebTest/Contact/AdvancedSearchTest.php | 2 +- tests/phpunit/WebTest/Contribute/UpdateContributionTest.php | 2 +- tests/phpunit/WebTest/Event/MultiprofileEventTest.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php index 865c694525..4b8cfccbfe 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php @@ -178,7 +178,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase { //-- search with non existing value ( sort name ) $this->type("sort_name", "$dummyName"); $this->clickLink("_qf_Advanced_refresh"); - $this->waitForText('css=div.messages', "No matches found for"); + $this->waitForText("xpath=//form[@id='Advanced']/div[3]/div/div", "No matches found for"); } /* diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index b739790312..c9bb362ec1 100644 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -197,7 +197,7 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { $this->clickLink("_qf_FinancialTypeAccount_next_new-botttom"); $this->select("account_relationship", "label=Premiums Inventory Account is"); $this->select("financial_account_id", "label=$to"); - $this->click("_qf_FinancialTypeAccount_next-botttom"); + $this->clickLink("_qf_FinancialTypeAccount_next-botttom"); $premiumName = 'Premium'.substr(sha1(rand()), 0, 7); $amount = 500; $sku = 'SKU'; diff --git a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php index ea6602d89c..3216ff3ef5 100644 --- a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php +++ b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php @@ -524,6 +524,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $this->check("is_multiple_registrations"); $this->select("custom_pre_id", "value=1"); $this->select("custom_post_id", "value=" . $profileId[3]); + $this->select("additional_custom_post_id", "label=- same as for main contact -"); $this->waitForElementPresent("xpath=//div[@id='registration_screen']/table[2]//tbody/tr[2]/td[2]/span/a[text()='add profile']"); $this->click("xpath=//div[@id='registration_screen']/table[2]//tbody/tr[2]/td[2]/span/a[text()='add profile']"); -- 2.25.1