+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
require_once 'CiviTest/CiviSeleniumTestCase.php';
class WebTest_Member_OnlineAutoRenewMembershipGCTest extends CiviSeleniumTestCase {
require_once 'CiviTest/CiviSeleniumTestCase.php';
class WebTest_Member_OnlineAutoRenewMembershipGCTest extends CiviSeleniumTestCase {
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$this->type('email-5', "{$lastName}@example.com");
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$this->type('email-5', "{$lastName}@example.com");
- $this->click("_qf_Main_upload-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Confirm_next_checkout");
+ $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next_checkout");
$text = 'I want this membership to be renewed automatically every 1 year(s).';
$this->assertElementContainsText('css=div.display-block', $text, 'Missing text: ' . $text);
$this->click("_qf_Confirm_next_checkout");
$text = 'I want this membership to be renewed automatically every 1 year(s).';
$this->assertElementContainsText('css=div.display-block', $text, 'Missing text: ' . $text);
$this->click("_qf_Confirm_next_checkout");
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$this->type('email-5', "{$lastName}@example.com");
$lastName = 'Smith_' . substr(sha1(rand()), 0, 7);
$this->type('email-5', "{$lastName}@example.com");
- $this->click("_qf_Main_upload-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent("_qf_Confirm_next_checkout");
+ $this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next_checkout");
$text = 'I want this membership to be renewed automatically every 1 year(s).';
$this->assertElementContainsText('css=div.display-block', $text, 'Missing text: ' . $text);
$this->click("_qf_Confirm_next_checkout");
$text = 'I want this membership to be renewed automatically every 1 year(s).';
$this->assertElementContainsText('css=div.display-block', $text, 'Missing text: ' . $text);
$this->click("_qf_Confirm_next_checkout");
- $hash = substr(sha1(rand()), 0, 7);
- $rand = 2 * rand(2, 50);
+ $hash = substr(sha1(rand()), 0, 7);
+ $rand = 2 * rand(2, 50);
$processorName = "Webtest Auto Renew Google Checkout" . $hash;
$this->webtestAddPaymentProcessor($processorName, 'Google_Checkout');
// -- start updating membership types
$processorName = "Webtest Auto Renew Google Checkout" . $hash;
$this->webtestAddPaymentProcessor($processorName, 'Google_Checkout');
// -- start updating membership types
$this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->type("duration_interval", "1");
$this->select("duration_unit", "label=year");
$this->type("duration_interval", "1");
$this->select("duration_unit", "label=year");
$this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->type("duration_interval", "1");
$this->select("duration_unit", "label=year");
$this->waitForElementPresent("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->click("xpath=//div[@id='membership_type_form']//table/tbody/tr[6]/td/label[contains(text(), 'Auto-renew Option')]/../../td[2]/label[contains(text(), 'Give option, but not required')]");
$this->type("duration_interval", "1");
$this->select("duration_unit", "label=year");
$this->click("_qf_MembershipType_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
// create contribution page with randomized title and default params
$this->click("_qf_MembershipType_upload-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
// create contribution page with randomized title and default params
$membershipTypes = array(array('id' => 1, 'auto_renew' => 1),
array('id' => 2, 'auto_renew' => 1),
);
$memPriceSetId = NULL;
$membershipTypes = array(array('id' => 1, 'auto_renew' => 1),
array('id' => 2, 'auto_renew' => 1),
);
$memPriceSetId = NULL;
$contributionTitle = "Title $hash";
$pageId = $this->webtestAddContributionPage($hash,
$contributionTitle = "Title $hash";
$pageId = $this->webtestAddContributionPage($hash,