<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testOfflineMembershipRenew() {
+ public function testOfflineMembershipRenew() {
$this->webtestLogin();
// make sure period is correct for the membership type we testing for,
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
-
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
'End date' => $endDate,
);
$this->webtestVerifyTabularData($verifyMembershipRenewData);
- }
+ }
- function testOfflineMemberRenewOverride() {
+ public function testOfflineMemberRenewOverride() {
$this->webtestLogin();
// add membership type
// Is status message correct?
$this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
- $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Renew']");
// click through to the Membership Renewal Link
- $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[2][text()='more']/ul/li[1]/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
-
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[1]/a[1][text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
- $joinDate = date('F jS, Y');
+ $joinDate = date('F jS, Y');
$startDate = date('F jS, Y', strtotime("+1 month"));
- $endDate = date('F jS, Y', strtotime("+4 year 1 month -1 day"));
+ $endDate = date('F jS, Y', strtotime("+4 year 1 month -1 day"));
// verify membership renew override
$verifyMembershipRenewOverrideData = array(
$this->webtestVerifyTabularData($verifyMembershipRenewOverrideData);
}
- function testOfflineMembershipRenewChangeType() {
+ public function testOfflineMembershipRenewChangeType() {
$this->webtestLogin();
// make sure period is correct for the membership type we testing for,
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
-
// page was loaded
$this->waitForTextPresent($sourceText);
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
- $joinDate = date('F jS, Y', strtotime("-2 year"));
+ $joinDate = date('F jS, Y', strtotime("-2 year"));
$startDate = date('F jS, Y');
- $endDate = date('F jS, Y', strtotime("+1 year -1 day"));
+ $endDate = date('F jS, Y', strtotime("+1 year -1 day"));
// verify membership renewed and the membership type is changed
$verifyMembershipData = array(
$this->webtestVerifyTabularData($verifyMembershipData);
}
- function testOfflineMembershipRenewMultipleTerms() {
+ public function testOfflineMembershipRenewMultipleTerms() {
$this->webtestLogin();
// make sure period is correct for the membership type we testing for,
// Record contribution
$this->click('record_contribution');
- $this->waitForElementPresent( 'financial_type_id' );
- $this->select( 'financial_type_id', "label=Member Dues" );
+ $this->waitForElementPresent('financial_type_id');
+ $this->select('financial_type_id', "label=Member Dues");
$this->select('payment_instrument_id', "label=Check");
$this->waitForElementPresent('check_number');
$this->type('check_number', '1023');
$this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
$this->waitForText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com.");
-
$this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
// click through to the Membership Renewal Link
$this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
-
// page was loaded
$this->waitForTextPresent($sourceText);
);
$this->webtestVerifyTabularData($verifyMembershipRenewData);
}
+
}