+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* Class WebTest_Contribute_ContributionPageAddTest
*/
class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
* Class WebTest_Contribute_ContributionPageAddTest
*/
class WebTest_Contribute_ContributionPageAddTest extends CiviSeleniumTestCase {
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
$texts = array(
"Title - New Membership $hash",
"This is introductory message for $pageTitle",
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
);
foreach ($texts as $text) {
$this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
$this->type('first_name', $firstName);
$this->type('last_name', $lastName);
$this->type('first_name', $firstName);
$this->type('last_name', $lastName);
$this->clickLink('_qf_Main_upload-bottom', '_qf_Confirm_next-bottom');
$this->click('_qf_Confirm_next-bottom');
$this->clickLink('_qf_Main_upload-bottom', '_qf_Confirm_next-bottom');
$this->click('_qf_Confirm_next-bottom');
- $this->type('sort_name', "$firstName $lastName");
- $this->select('financial_type_id',"label=Member Dues");
+ $this->type('sort_name', "$lastName $firstName");
+ $this->select('financial_type_id', "label=Member Dues");
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
$this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
$expected = array(
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
$this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
$expected = array(
$this->click("xpath=id('Search')/div[2]/div/div[1]");
$this->waitForElementPresent("financial_type_id");
$this->type("sort_name", $firstName);
$this->click("xpath=id('Search')/div[2]/div/div[1]");
$this->waitForElementPresent("financial_type_id");
$this->type("sort_name", $firstName);
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
$this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
$this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE);
$this->clickLink("xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_MembershipView_cancel-bottom', FALSE);
$this->clickLink('_qf_Search_refresh', "xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE);
$this->clickLink("xpath=//div[@id='memberSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_MembershipView_cancel-bottom', FALSE);
// fill in Receipt details
$this->type('thankyou_title', "Thank-you Page Title $hash");
// fill in Receipt details
$this->type('thankyou_title', "Thank-you Page Title $hash");
$this->fillRichTextField('thankyou_text', 'This is thankyou message for ' . $pageTitle, 'CKEditor');
$this->fillRichTextField('thankyou_text', 'This is thankyou message for ' . $pageTitle, 'CKEditor');
$this->fillRichTextField('thankyou_footer', 'This is thankyou footer message for ' . $pageTitle, 'CKEditor');
$this->click('is_email_receipt');
$this->waitForElementPresent('bcc_receipt');
$this->fillRichTextField('thankyou_footer', 'This is thankyou footer message for ' . $pageTitle, 'CKEditor');
$this->click('is_email_receipt');
$this->waitForElementPresent('bcc_receipt');