From 234aef82481e88c5aa79a2d4ed653114440d0607 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Fri, 10 Oct 2014 18:58:26 +0530 Subject: [PATCH] webtest fix --- .../WebTest/Contact/AdvancedSearchTest.php | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php index 873c144aa9..8fdee7be3b 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php @@ -231,27 +231,13 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase { $this->webtestLogin(); $this->openCiviPage('contact/search/advanced', 'reset=1', 'group'); $this->select2("group", "Newsletter", TRUE); + $this->select2("group", "Summer", TRUE); $this->select2("group", "Advisory", TRUE); $this->clickAjaxLink("location", 'country'); $this->select2("country", "United States", False); - $this->clickLink("_qf_Advanced_refresh"); - - $stateBeforeSort = $this->getText("xpath=//div[@class='crm-search-results']//table/tbody/tr[2]/td[6]"); - $this->click("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]"); - $this->waitForElementPresent("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]"); - $this->assertElementNotContainsText("xpath=//div[@class='crm-search-results']//table/tbody/tr[2]/td[6]", $stateBeforeSort); - $this->clickAjaxLink("xpath=//form[@id='Advanced']//div//div[contains(text(),'Edit Search Criteria')]/../div", 'group'); - $this->select2("group", "Summer", TRUE); $this->waitForElementPresent('state_province'); - $this->select2("state_province", "Ohio", TRUE); - $this->select2("state_province", "New York", TRUE); - $this->select2("state_province", "New Mexico", TRUE); - $this->select2("state_province", "Mississippi", TRUE); - $this->select2("state_province", "Connecticut", TRUE); - $this->select2("state_province", "Georgia", TRUE); - $this->select2("state_province", "New Jersey", TRUE); - $this->select2("state_province", "Texas", TRUE); - $this->clickLink("_qf_Advanced_refresh"); + $this->multiselect2("state_province", array("Ohio", "New York", "New Mexico", "Connecticut", "Georgia", "New Jersey", "Texas")); + $this->clickLink("_qf_Advanced_refresh", "xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[6]"); $stateBeforeSort = $this->getText("xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[6]"); $this->click("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]"); -- 2.25.1