WebtestFix
authorSudha Bisht <sudha.bisht@webaccessglobal.com>
Mon, 2 Nov 2015 13:53:29 +0000 (19:23 +0530)
committerSudha Bisht <sudha.bisht@webaccessglobal.com>
Mon, 2 Nov 2015 13:53:29 +0000 (19:23 +0530)
tests/phpunit/WebTest/Member/DefaultMembershipPricesetTest.php
tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php

index 93a8b1ef08a3fcc02a46999cbecd04e51ad958de..e17b9104e4522dca738a25ad7e622e9fe96ef53e 100755 (executable)
@@ -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."));
index 8d57aa977527a81d4c7da080c18df64974dbb3af..a2b59a9a643906f388707031d14859e8ea88096a 100644 (file)
@@ -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");