// Is status message correct?
$this->waitForText("crm-notification-container", "Event registration for $displayName has been added");
- $this->waitForElementPresent("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table//tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']");
//click through to the participant view screen
- $this->click("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']/table//tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent('_qf_ParticipantView_cancel-bottom');
$this->webtestVerifyTabularData(
// Let Start Date and End Date be auto computed
// Record contribution
- $this->click('record_contribution');
$this->waitForElementPresent('financial_type_id');
$this->select('financial_type_id', "label=Member Dues");
$this->select('payment_instrument_id', "label=Check");
$this->select('contribution_status_id', "label=Completed");
$this->click('send_receipt');
- // Because it tends to cause problems, all uses of sleep() must be justified in comments
- // Sleep should never be used for wait for anything to load from the server
- // Justification for this instance: make sure onchange for total_amount has a chance to fire
- sleep(2);
+ $this->waitForElementPresent('_qf_Membership_upload-bottom');
// Clicking save.
$this->click('_qf_Membership_upload-bottom');
// page was loaded
$this->waitForTextPresent($sourceText);
+ $endDate = $this->getText("xpath=//div[@id='memberships']//table/tbody/tr/td[4]");
// Is status message correct?
- $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->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added. The new membership End Date is {$endDate}. 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->waitForElementPresent('num_terms');
$this->type('num_terms', '');
$this->type('num_terms', '2');
-
- // Because it tends to cause problems, all uses of sleep() must be justified in comments
- // Sleep should never be used for wait for anything to load from the server
- // Justification for this instance: make sure onchange for total_amount has a chance to fire
- sleep(2);
+ $this->waitForElementPresent('total_amount');
$this->click('total_amount');
$this->verifyValue('total_amount', "200.00");
$this->select('financial_type_id', "label=Member Dues");
// click through to the membership view screen
$this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
- $this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
+ $this->waitForElementPresent("xpath=//button//span[contains(text(),'Done')]");
$joinDate = $startDate = date('F jS, Y', strtotime("-2 year"));
// Adding 2 x 2 years renewal to initial membership.