From: pratikshad Date: Thu, 8 Jan 2015 13:52:33 +0000 (+0530) Subject: Fixed webtest of export and testAdvanceSearch of Contact_AdavanceSearchTest X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fc0a5af621552dea17114a6a92854786429d6da5;p=civicrm-core.git Fixed webtest of export and testAdvanceSearch of Contact_AdavanceSearchTest --- diff --git a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php index 65c297baed..708a144d7c 100644 --- a/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php +++ b/tests/phpunit/WebTest/Contact/AdvancedSearchTest.php @@ -243,7 +243,6 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase { $stateBeforeSort = $this->getText("xpath=//div[@class='crm-search-results']//table/tbody/tr[1]/td[6]"); $this->clickAjaxLink("xpath=//div[@class='crm-search-results']//table/thead/tr//th/a[contains(text(),'State')]"); - $this->clickAjaxLink("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[1]/td[6]", $stateBeforeSort); } diff --git a/tests/phpunit/WebTest/Export/ContactTest.php b/tests/phpunit/WebTest/Export/ContactTest.php index 32c1c92536..a22e6e6b20 100644 --- a/tests/phpunit/WebTest/Export/ContactTest.php +++ b/tests/phpunit/WebTest/Export/ContactTest.php @@ -120,16 +120,6 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { // All other rows to be check. $checkRows = array( 1 => array( - 'First Name' => $firstContactName, - 'Last Name' => 'Smith', - 'Email' => '' . strtolower($emailContactFirst) . '', - 'Sort Name' => $sortFirstName, - 'Display Name' => $prefixLabelContactFrst . ' ' . $displayFirstName . ' ' . $suffixLabelContactFrst, - 'Individual Prefix' => $prefixLabelContactFrst, - 'Individual Suffix' => $suffixLabelContactFrst, - 'Gender' => $genderLabelContactFrst, - ), - 2 => array( 'First Name' => $secondContactName, 'Last Name' => 'John', 'Email' => '' . strtolower($emailContactSecond) . '', @@ -139,6 +129,16 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { 'Individual Suffix' => $suffixLabelContactScnd, 'Gender' => $genderLabelContactScnd, ), + 2 => array( + 'First Name' => $firstContactName, + 'Last Name' => 'Smith', + 'Email' => '' . strtolower($emailContactFirst) . '', + 'Sort Name' => $sortFirstName, + 'Display Name' => $prefixLabelContactFrst . ' ' . $displayFirstName . ' ' . $suffixLabelContactFrst, + 'Individual Prefix' => $prefixLabelContactFrst, + 'Individual Suffix' => $suffixLabelContactFrst, + 'Gender' => $genderLabelContactFrst, + ), ); // Read CSV and fire assertions. @@ -239,19 +239,19 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { // All other rows to be check. $checkRows = array( 1 => array( - 'First Name' => $firstName, - 'Last Name' => 'Smith', - 'Email' => "$firstName.smith@example.org", - 'Sort Name' => $sortName, - 'Display Name' => $displayName, - ), - 2 => array( 'First Name' => $childName, 'Last Name' => 'John', 'Email' => "$childName.john@example.org", 'Sort Name' => $childSortName, 'Display Name' => $childDisplayName, ), + 2 => array( + 'First Name' => $firstName, + 'Last Name' => 'Smith', + 'Email' => "$firstName.smith@example.org", + 'Sort Name' => $sortName, + 'Display Name' => $displayName, + ), ); // Read CSV and fire assertions. @@ -282,7 +282,7 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase { $this->type("address_1_street_address", "121A Sherman St. Apt. 12"); $this->type("address_1_city", "Dumfries"); $this->type("address_1_postal_code", "1234"); - $this->assertElementContainsText('address_table_1', "- select - United States"); + $this->select("address_1_country_id", "United States"); $this->select("address_1_state_province_id", "value=1019"); $this->click('_qf_Contact_upload_view');