<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2016 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
$this->webtestLogout();
//Go to online membership signup page
- $this->openCiviPage("contribute/transact", "reset=1&id=2", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=2&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div[2]/span/label/span[1][contains(text(),'Student')]");
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$lastName $firstName");
+ $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
$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");
//logout
$this->webtestLogout();
- $this->openCiviPage("contribute/transact", "reset=1&id=2", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=2&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div[2]/span/label/span[1][contains(text(),'Student')]");
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$lastName $firstName");
+ $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
$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");
$lastName = 'An' . substr(sha1(rand()), 0, 7);
//Go to online membership signup page
- $this->openCiviPage("contribute/transact", "reset=1&id=2", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=2&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div[1]/span/label/span[1][contains(text(),'General')]");
//Type first name and last name
$this->type("first_name", $firstName);
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$lastName $firstName");
+ $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
$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");
preg_quote($value)
);
}
- $this->openCiviPage("contribute/transact", "reset=1&id=2", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=2&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div[2]/span/label/span[1][contains(text(),'Student')]");
//Credit Card Info
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$lastName $firstName");
+ $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
$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");
$this->type('duration_interval', 1);
$this->select('duration_unit', 'label=year');
$this->select('period_type', 'value=rolling');
-
$this->select2('relationship_type_id', 'Employer of', TRUE);
$this->click('_qf_MembershipType_upload-bottom');
$this->webtestLogout();
//get Url for Live Contribution Page
- $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", '_qf_Main_upload-bottom');
+ $this->openCiviPage("contribute/transact", "reset=1&id=$pageId&action=preview", '_qf_Main_upload-bottom');
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div/span/label/span[1][contains(text(),'$membershipTypeTitle')]");
$firstName = 'Eia' . substr(sha1(rand()), 0, 4);
$lastName = 'Ande' . substr(sha1(rand()), 0, 4);
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$organisationName");
+ $this->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
$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");
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$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->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
+ $this->clickLink("_qf_Search_refresh", "css=#memberSearch table tbody tr td a.action-item:first-child");
+ $this->click("css=#memberSearch table tbody tr td a.action-item:first-child");
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
//View Membership Record
//logout
$this->webtestLogout();
- $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=$pageId&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div/span/label/span[1][contains(text(),'$membershipTypeTitle')]");
$this->type("email-5", $email);
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$this->type("sort_name", "$organisationName");
- $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->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
+ $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td a.action-item:first-child');
+ $this->click('css=#memberSearch table tbody tr td a.action-item:first-child');
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
//View Membership Record
$this->openCiviPage("member/search", "reset=1", "member_end_date_high");
$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->click("xpath=//tr/td[1]/p/label[contains(text(),'Membership is a Test?')]/../label[contains(text(),'Yes')]/preceding-sibling::input[1]");
+ $this->clickLink("_qf_Search_refresh", 'css=#memberSearch table tbody tr td a.action-item:first-child');
+ $this->click('css=#memberSearch table tbody tr td a.action-item:first-child');
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
//View Membership Record
$title = substr(sha1(rand()), 0, 7);
$membershipTypeTitle = "Membership Type $title";
$this->type('name', "Membership Type $title");
-
+ $this->waitForAjaxContent();
$this->select2('member_of_contact_id', 'Default Organization');
$this->type('minimum_fee', '100');
$lastName = 'Ande' . substr(sha1(rand()), 0, 4);
$email = $firstName . '@test.com';
- $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=$pageId&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div/span/label/span[1][contains(text(),'$membershipTypeTitle')]");
$this->waitForElementPresent("auto_renew");
$this->click('is_recur');//disable recurring contribution
$this->clickLink('_qf_Amount_next', '_qf_Amount_next-bottom');
- $this->openCiviPage("contribute/transact", "reset=1&id=$pageId", "_qf_Main_upload-bottom");
+ $this->openCiviPage("contribute/transact", "reset=1&id=$pageId&action=preview", "_qf_Main_upload-bottom");
$this->click("xpath=//div[@class='crm-section membership_amount-section']/div[2]/div/span/label/span[1][contains(text(),'$membershipTypeTitle')]");
$this->type("xpath=//div[@class='content other_amount-content']/input[@type='text']", '30');
$this->click("is_recur");
$this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
$this->assertTrue($this->isTextPresent("I want to contribute this amount every month."));
$this->click("_qf_Confirm_next-bottom");
- sleep(10);
$this->waitForPageToLoad($this->getTimeoutMsec());
$expectedParams = array(