}
$this->open($this->sboxPath . 'civicrm/admin/paymentProcessor?action=add&reset=1&pp=' . $pid);
$this->waitForPageToLoad($this->getTimeoutMsec());
- $this->waitForElementPresent('name');
$this->type('name', $processorName);
$this->select('financial_account_id', "label={$financialAccount}");
// Clicking save.
$this->click("_qf_Membership_upload");
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
$this->webtestVerifyTabularData($verifyData);
$this->click("_qf_MembershipView_cancel-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
+ $this->waitForElementPresent("css=li#tab_activity a");
// click through to the activities screen
$this->click("css=li#tab_activity a");
// page was loaded
'Source' => $sourceText,
);
$this->webtestVerifyTabularData($verifyData);
- $this->clickLink("_qf_MembershipView_cancel-bottom", "xpath=//div[@id='memberships']/div/table/tbody//tr/td[1][text()='{$memTypeParams['membership_type']}']/../td[7]");
+ $this->clickLink("_qf_MembershipView_cancel-bottom", "xpath=//div[@id='memberships']/div/table/tbody//tr/td[1][text()='{$memTypeParams['membership_type']}']/../td[7]", FALSE);
$this->click("xpath=//div[@id='memberships']/div/table/tbody//tr/td[1][text()='{$memTypeParams['membership_type']}']/../td[9]/span/a[2][text()='Edit']");
$this->waitForElementPresent("_qf_Membership_cancel-bottom");
$this->click("xpath=//form[@id='Membership']/div[2]/div[2]//table/tbody//tr[@class='crm-membership-form-block-end_date']/td[2]/a[@title='Clear']");
$this->click("_qf_Membership_upload-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// page was loaded
$this->waitForTextPresent($sourceText);
$this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
// Clicking save.
$this->click("_qf_Membership_upload");
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
$setHelp = 'Select your membership options.';
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$this->_testAddSet($setTitle, $usedFor, $contributionType, $setHelp);
elseif ($usedFor == 'Membership') {
$this->click('extends_3');
$this->waitForElementPresent('financial_type_id');
- $this->select("css=select.form-select", "label={$contributionType}");
+ $this->select("css=select.crm-form-select", "label={$contributionType}");
}
$this->type('help_pre', $setHelp);
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$memTypeParams2 = $this->webtestAddMembershipType();
$memTypeTitle2 = $memTypeParams2['membership_type'];
- $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
$this->openCiviPage("admin/price/field", "reset=1&action=add&sid={$sid}");
$this->openCiviPage('admin/price', 'reset=1');
// Use the price set id ($sid) to pick the correct row
- $this->click("css=tr#row_{$sid} a[title='Preview Price Set']");
+ $this->click("css=tr#price_set-{$sid} a[title='Preview Price Set']");
// Look for Register button
$this->waitForElementPresent('_qf_Preview_cancel-bottom');
$this->click('_qf_Membership_upload-bottom');
}
else {
- $this->click("xpath=//div[@id='memberships']//table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']/div//table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
$this->click('_qf_MembershipRenewal_upload-bottom');
$this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr");
- $this->click("xpath=//div[@id='memberships']//table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']/div//table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
$this->click('_qf_MembershipRenewal_upload-bottom');
}
$setHelp = 'Select your membership options.';
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$this->_testAddSet($setTitle, $usedFor, $contributionType, $setHelp);
elseif ($usedFor == 'Membership') {
$this->click('extends[3]');
$this->waitForElementPresent( 'financial_type_id' );
- $this->select("css=select.form-select", "label={$contributionType}");
+ $this->select("css=select.crm-form-select", "label={$contributionType}");
}
$this->type('help_pre', $setHelp);
function _testAddPriceFields(&$fields, &$validateString, $dateSpecificFields = FALSE, $title, $sid, $contributionType) {
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$memTypeParams2 = $this->webtestAddMembershipType();
$memTypeTitle2 = $memTypeParams2['membership_type'];
- $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
$this->openCiviPage('admin/price/field', "reset=1&action=add&sid={$sid}");
$this->openCiviPage('admin/price', 'reset=1');
// Use the price set id ($sid) to pick the correct row
- $this->clickLink("css=tr#row_{$sid} a[title='Preview Price Set']", '_qf_Preview_cancel-bottom');
+ $this->clickLink("css=tr#price_set-{$sid} a[title='Preview Price Set']", '_qf_Preview_cancel-bottom');
// Check for expected price set field strings
$this->assertStringsPresent($validateStrings);
);
}
- $this->clickLink('_qf_MembershipView_cancel-bottom', "xpath=//div[@id='memberSearch']/table/tbody/tr[2]");
+ $this->clickLink('_qf_MembershipView_cancel-bottom', "xpath=//div[@id='memberSearch']/table/tbody/tr[2]", FALSE);
$this->click("xpath=//div[@id='memberSearch']/table/tbody//tr/td[4][text()='{$memTypeTitle2}']/../td[11]/span/a[text()='View']");
$this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
// create two new membership types
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$memTypeParams2 = $this->webtestAddMembershipType();
$memTypeTitle2 = $memTypeParams2['membership_type'];
- $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
// edit contribution page memberships tab to add two new membership types
$this->webtestVerifyTabularData($verifyData);
// Click View action link on associated contribution record
- $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector']/tbody/tr[1]/td[8]/span/a[text()='View']");
- $this->click("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
//View Contribution Record
$verifyData = array(
$this->type("sort_name", "$firstName $lastName");
$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");
+ $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
//View Contribution Record and verify data
$expected = array(
// fill in Profiles
$this->waitForElementPresent('custom_pre_id');
- $this->select('custom_pre_id', 'value=1');
+ $this->select('css=tr.crm-contribution-contributionpage-custom-form-block-custom_pre_id span.crm-profile-selector-select select', 'value=1');
// save
$this->click('_qf_Custom_upload_done');
$this->type("first_name", $firstName);
$this->type("last_name", $lastName);
$this->type("email-5", $email);
+ $this->select("state_province-1", "value=1001");
//Credit Card Info
$this->select("credit_card_type", "value=Visa");
$this->type("first_name", $firstName);
$this->type("last_name", $lastName);
$this->type("email-5", $email);
+ $this->select("state_province-1", "value=1001");
//Credit Card Info
$this->select("credit_card_type", "value=Visa");
// fill in Profiles
$this->waitForElementPresent('custom_pre_id');
- $this->select('custom_pre_id', 'value=1');
+ $this->select('css=tr.crm-contribution-contributionpage-custom-form-block-custom_pre_id span.crm-profile-selector-select select', 'value=1');
// save
$this->click('_qf_Custom_upload_done');
$this->type("first_name", $firstName);
$this->type("last_name", $lastName);
+ $this->select("state_province-1", "value=1001");
//Credit Card Info
$this->select("credit_card_type", "value=Visa");
$this->select("credit_card_type", "label=Visa");
$membershipTypeTitle = "Membership Type $title";
$this->type('name', "Membership Type $title");
- $this->type('member_of_contact', $title);
- $this->click('member_of_contact');
- $this->waitForElementPresent("css=div.ac_results-inner li");
- $this->click("css=div.ac_results-inner li");
+ $this->select2('member_of_contact_id', $title);
$this->type('minimum_fee', '100');
$this->select( 'financial_type_id', 'value=2' );
$this->type('duration_interval', 1);
$this->select('duration_unit', 'label=year');
- $this->select('period_type', 'label=rolling');
+ $this->select('period_type', 'value=rolling');
$this->removeSelection('relationship_type_id', 'label=- select -');
$this->addSelection('relationship_type_id', 'label=Employer of');
$this->type('first_name', $firstName);
$this->type('last_name', $lastName);
+ $this->select("state_province-1", "value=1001");
//Credit Card Info
$this->select("credit_card_type", "value=Visa");
$this->type('first_name', $firstName);
$this->type('last_name', $lastName);
+ $this->select("state_province-1", "value=1001");
//Credit Card Info
$this->select("credit_card_type", "value=Visa");
// create new membership types
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$memTypeParams2 = $this->webtestAddMembershipType();
$memTypeTitle2 = $memTypeParams2['membership_type'];
- $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[2]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/div[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
// edit contribution page memberships tab to add two new membership types
$this->webtestVerifyTabularData($verifyData);
// Click View action link on associated contribution record
- $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector']/tbody/tr[1]/td[8]/span/a[text()='View']");
- $this->click("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
//View Contribution Record
$this->webtestVerifyTabularData($verifyData);
$this->click("_qf_ContributionView_cancel-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
}
function _testOnlineMembershipSignup($pageId, $memTypeId, $cid = NULL) {
// Clicking save.
$this->click('_qf_Membership_upload');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// Is status message correct?
$this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.");
// New membership type
$this->type('name', $memTypeParams['membership_type']);
- $this->type('member_of_contact', $membershipTitle);
- $this->click('member_of_contact');
- $this->waitForElementPresent("css=div.ac_results-inner li");
- $this->click("css=div.ac_results-inner li");
+ $this->select2('member_of_contact_id', $membershipTitle);
// Membership fees
$this->type('minimum_fee', '100');
$this->select('duration_unit', "label=year");
// Membership period type
- $this->select('period_type', "label=rolling");
+ $this->select('period_type', "value=rolling");
$this->click('relationship_type_id', "value={$memTypeParams['relationship_type']}");
// Clicking save