From 8fb46c61e2ba638ac1281881eb7740e973416d06 Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Fri, 12 Dec 2014 18:28:50 +0530 Subject: [PATCH] Fix for Webtest --- tests/phpunit/WebTest/Contribute/AddBatchesTest.php | 4 ++-- tests/phpunit/WebTest/Contribute/AddPricesetTest.php | 2 +- .../WebTest/Contribute/ContributionPageAddTest.php | 4 ++-- .../phpunit/WebTest/Contribute/OnlineContributionTest.php | 2 +- tests/phpunit/WebTest/Event/ParticipantSearchTest.php | 1 + .../phpunit/WebTest/Member/OnlineMembershipCreateTest.php | 6 +++--- .../phpunit/WebTest/Member/OnlineMembershipRenewTest.php | 8 ++++---- .../WebTest/Member/SeperateMembershipPaymentTest.php | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/phpunit/WebTest/Contribute/AddBatchesTest.php b/tests/phpunit/WebTest/Contribute/AddBatchesTest.php index 770d4947a1..93eb445ced 100644 --- a/tests/phpunit/WebTest/Contribute/AddBatchesTest.php +++ b/tests/phpunit/WebTest/Contribute/AddBatchesTest.php @@ -181,7 +181,7 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase { function _checkResult($data, $type) { if ($type == "Contribution") { $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); - $this->type("sort_name", "{$data['first_name']} {$data['last_name']}"); + $this->type("sort_name", "{$data['last_name']} {$data['first_name']} "); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); $expected = array( @@ -205,7 +205,7 @@ class WebTest_Contribute_AddBatchesTest extends CiviSeleniumTestCase { $this->openCiviPage("member/search", "reset=1", "member_join_date_low"); // select contact - $this->type("sort_name", "{$data['first_name']} {$data['last_name']}"); + $this->type("sort_name", "{$data['last_name']} {$data['first_name']} "); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->click("xpath=//div[@id='memberSearch']//table/tbody/tr[1]/td[11]/span/a[text()='View']"); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); diff --git a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php index bf9d07a1e8..7d09b6c9fa 100644 --- a/tests/phpunit/WebTest/Contribute/AddPricesetTest.php +++ b/tests/phpunit/WebTest/Contribute/AddPricesetTest.php @@ -419,7 +419,7 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search", "reset=1", 'contribution_date_low'); - $this->type('sort_name', "$firstName $lastName"); + $this->type('sort_name', "$lastName $firstName "); $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); diff --git a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php index b68700a89b..6cb7277a4a 100644 --- a/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php +++ b/tests/phpunit/WebTest/Contribute/ContributionPageAddTest.php @@ -234,7 +234,7 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search", "reset=1", 'contribution_date_low'); - $this->type('sort_name', "$firstName $lastName"); + $this->type('sort_name', "$lastName $firstName "); $this->select('financial_type_id',"label=Member Dues"); $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE); @@ -267,7 +267,7 @@ class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", 'member_source'); - $this->type('sort_name', "$firstName $lastName"); + $this->type('sort_name', "$lastName $firstName "); $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE); $this->clickLink("xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_MembershipView_cancel-bottom', FALSE); diff --git a/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php b/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php index 08fa752a98..e58b9a3aeb 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php @@ -144,7 +144,7 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom",FALSE); diff --git a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php index cb6a4bbd02..324c6f8c15 100644 --- a/tests/phpunit/WebTest/Event/ParticipantSearchTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantSearchTest.php @@ -151,6 +151,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase { $this->openCiviPage("event/search", "reset=1"); $eventTypeName = 'Fundraiser'; + $this->waitForElementPresent('event_type_id'); $this->select2("event_type_id", $eventTypeName); $this->select('event_relative', "label=Choose Date Range"); $this->webtestFillDate('event_start_date_low', '-2 year'); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index 285a648a42..e2c9fe97c4 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -125,7 +125,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName "); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']/table/tbody/tr"); $this->click("xpath=//div[@id='memberSearch']/table/tbody/tr/td[11]/span/a[text()='View']"); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); @@ -174,7 +174,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName "); $this->click("_qf_Search_refresh"); $this->waitForPageToLoad($this->getTimeoutMsec()); @@ -319,7 +319,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search","reset=1", "contribution_date_low"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName "); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php index cd62fa5442..c377eb8dbf 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipRenewTest.php @@ -135,7 +135,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); @@ -190,7 +190,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); @@ -300,7 +300,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); @@ -337,7 +337,7 @@ class WebTest_Member_OnlineMembershipRenewTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->click('css=#memberSearch table tbody tr td span a.action-item:first-child'); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); diff --git a/tests/phpunit/WebTest/Member/SeperateMembershipPaymentTest.php b/tests/phpunit/WebTest/Member/SeperateMembershipPaymentTest.php index 16bc2cce4f..8cef19fb82 100644 --- a/tests/phpunit/WebTest/Member/SeperateMembershipPaymentTest.php +++ b/tests/phpunit/WebTest/Member/SeperateMembershipPaymentTest.php @@ -111,7 +111,7 @@ class WebTest_Member_SeperateMembershipPaymentTest extends CiviSeleniumTestCase //Find Member $this->openCiviPage('member/search', 'reset=1', 'member_end_date_high'); - $this->type("sort_name", "$firstName1 $lastName1"); + $this->type("sort_name", "$lastName1 $firstName1"); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']/table/tbody/tr"); $this->click("xpath=//div[@id='memberSearch']/table/tbody/tr/td[11]/span/a[text()='View']"); $this->waitForElementPresent("_qf_MembershipView_cancel-bottom"); -- 2.25.1