_configureMembershipPage(); //now do the test membership signup. $this->openCiviPage('contribute/transact', "reset=1&action=preview&id={$pageId}", "_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->click("auto_renew"); $firstName = 'John'; $lastName = 'Smith_' . substr(sha1(rand()), 0, 7); $this->type('email-5', "{$lastName}@example.com"); $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"); } public function testOnlineAutoRenewMembershipAuthenticated() { //configure membership signup page. $pageId = $this->_configureMembershipPage(); $this->webtestLogin(); $this->waitForPageToLoad($this->getTimeoutMsec()); //now do the test membership signup. $this->openCiviPage('contribute/transact', "reset=1&action=preview&id={$pageId}", "_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->click("auto_renew"); $firstName = 'John'; $lastName = 'Smith_' . substr(sha1(rand()), 0, 7); $this->type('email-5', "{$lastName}@example.com"); $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"); } }