From ef7308e8907683b1c562d0371cd27b12e39c4b00 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Mon, 2 Nov 2015 19:23:29 +0530 Subject: [PATCH] WebtestFix --- .../Member/DefaultMembershipPricesetTest.php | 14 +++++++------- .../WebTest/Member/OnlineMembershipCreateTest.php | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php b/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php index 93a8b1ef08..e17b9104e4 100755 --- a/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php +++ b/tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php @@ -83,7 +83,7 @@ class WebTest_Member_DefaultMembershipPricesetTest extends CiviSeleniumTestCase //senario 1 $this->openCiviPage("contribute/transact", "reset=1&id={$membershipContributionPageId}&cid={$cid}&action=preview", "_qf_Main_upload-bottom"); - $this->_testDefaultSenarios("National_Membership_{$title}-section", 2); + $this->_testDefaultSenarios("national_membership_{$title}-section", 2); $this->contactInfoFill($firstName, $lastName, $email, $contactParams, $streetAddress); $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom"); $this->click("_qf_Confirm_next-bottom"); @@ -92,10 +92,10 @@ class WebTest_Member_DefaultMembershipPricesetTest extends CiviSeleniumTestCase //senario 2 $this->openCiviPage("contribute/transact", "reset=1&id={$membershipContributionPageId}&cid={$cid}&action=preview", "_qf_Main_upload-bottom"); // checking - $this->checkOptions("National_Membership_{$title}-section", 2); + $this->checkOptions("national_membership_{$title}-section", 2); // senario 1 - $this->_testDefaultSenarios("National_Membership_{$title}-section", 4); - $this->_testDefaultSenarios("Second_Membership_{$title}-section", 2); + $this->_testDefaultSenarios("national_membership_{$title}-section", 4); + $this->_testDefaultSenarios("second_membership_{$title}-section", 2); $this->contactInfoFill($firstName, $lastName, $email, $contactParams, $streetAddress); $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom"); $this->click("_qf_Confirm_next-bottom"); @@ -104,10 +104,10 @@ class WebTest_Member_DefaultMembershipPricesetTest extends CiviSeleniumTestCase //senario 3 $this->openCiviPage("contribute/transact", "reset=1&id={$membershipContributionPageId}&cid={$cid}&action=preview", "_qf_Main_upload-bottom"); // checking - $this->checkOptions("Second_Membership_{$title}-section", 2); + $this->checkOptions("second_membership_{$title}-section", 2); // senario 2 - $this->_testDefaultSenarios("National_Membership_{$title}-section", 3); + $this->_testDefaultSenarios("national_membership_{$title}-section", 3); $this->contactInfoFill($firstName, $lastName, $email, $contactParams, $streetAddress); $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom"); $this->click("_qf_Confirm_next-bottom"); @@ -118,7 +118,7 @@ class WebTest_Member_DefaultMembershipPricesetTest extends CiviSeleniumTestCase // checking senario 3 $this->assertTrue($this->isTextPresent("You have a current Lifetime Membership which does not need to be renewed.")); - $this->_testDefaultSenarios("National_Membership_{$title}-section", 1); + $this->_testDefaultSenarios("national_membership_{$title}-section", 1); $this->contactInfoFill($firstName, $lastName, $email, $contactParams, $streetAddress); $this->clickLink("_qf_Main_upload-bottom", "_qf_Main_upload-bottom"); $this->assertTrue($this->isTextPresent("You already have a lifetime membership and cannot select a membership with a shorter term.")); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index 8d57aa9775..a2b59a9a64 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -456,16 +456,16 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); $this->type("sort_name", "$lastName $firstName"); + $this->click("xpath=//tr/td[1]/label[contains(text(), 'Contribution is a Test?')]/../../td[2]/label[contains(text(), 'Yes')]/preceding-sibling::input[1]"); $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); //View Contribution Record and verify data $expected = array( 'From' => "{$firstName} {$lastName}", - 'Financial Type' => 'Member Dues', + 'Financial Type' => 'Member Dues (test) ', 'Total Amount' => '0.00', 'Contribution Status' => 'Completed', - 'Received Into' => 'Payment Processor Account', 'Source' => "Online Contribution: $contributionTitle", 'Online Contribution Page' => $contributionTitle, ); @@ -473,6 +473,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { //Find Member $this->openCiviPage("member/search", "reset=1", "member_end_date_high"); + $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]"); $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='memberSearch']/table/tbody/tr"); -- 2.25.1