$setHelp = 'Select your membership options.';
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $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 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$this->_testAddSet($setTitle, $usedFor, $contributionType, $setHelp);
$this->select("financial_type_id", "label={$contributionType}");
$this->waitForElementPresent('_qf_Field_next-bottom');
$this->click('_qf_Field_next-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
// load the Price Set Preview and check for expected values
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
$this->click('_qf_Set_next-bottom');
- $this->waitForElementPresent('_qf_Field_next-bottom');
+ $this->waitForElementPresent("xpath=//div[@id='crm-main-content-wrapper']//div[2]/a");
$this->waitForText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
}
$this->waitForElementPresent('recordContribution');
$this->click('_qf_Membership_upload-bottom');
- $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr");
- $this->click("xpath=//div[@id='memberships']//table/tbody//tr/td[text()='{$endDate}']/../td[9]/span/a[text()='View']");
- $this->waitForElementPresent("_qf_MembershipView_cancel-bottom");
+ $this->waitForElementPresent("xpath=//table[@class='display dataTable no-footer']/tbody//tr/td[4][text()='{$endDate}']/../td[9]/span[1]/a[1]");
+ $this->click("xpath=//table[@class='display dataTable no-footer']/tbody//tr/td[4][text()='{$endDate}']/../td[9]/span[1]/a[1]");
+ $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
//View Membership Record
$verifyData = array(
'Membership Type' => "$memTypeTitle1",
$this->webtestVerifyTabularData($verifyData);
//check if the membership amount is correct
- $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[2]/tbody/tr/td/span[text()='{$amount}']");
- $this->assertTrue($this->isElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[2]/tbody/tr/td/span[text()='{$amount}']"));
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr/td/span[text()='{$amount}']");
+ $this->assertTrue($this->isElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr/td/span[text()='{$amount}']"));
$this->click("_qf_MembershipView_cancel-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
}
}
// Clicking save.
$this->click('_qf_Membership_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
// Clicking save.
$this->click('_qf_Membership_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
// Clicking save.
$this->click('_qf_Membership_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
// Clicking save.
$this->click('_qf_Membership_upload-bottom');
- $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[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
$memTypeId1 = $memTypeId1[1];
$this->_testAddSet($setTitle, $usedFor, $contributionType, $setHelp);
$this->type('help_pre', $setHelp);
$this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
- $this->clickLink('_qf_Set_next-bottom', '_qf_Field_next-bottom');
+ $this->waitForElementPresent('_qf_Set_next-bottom');
+ $this->click('_qf_Set_next-bottom');
$this->waitForText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
}
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[1]/table/tbody//tr/td[text()='{$memTypeTitle1}']/../td[12]/span/a[3]@href"));
+ $memTypeId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][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[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
$memTypeId2 = $memTypeId2[1];
$this->openCiviPage('admin/price/field', "reset=1&action=add&sid={$sid}");
// create two new membership types
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $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 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][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[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][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 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");
+ $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']");
+ $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[1][text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
//View Contribution Record
$verifyData = array(
'From' => $firstName . ' ' . $lastName,
$this->click("xpath=//div[@class='crm-section payment_processor-section']/div[2]//label[text()='Pay later label {$hash}']");
}
$this->type("email-5", $firstName . "@example.com");
-
+ $this->waitForElementPresent("first_name");
$this->type("first_name", $firstName);
+ $this->waitForElementPresent("last_name");
$this->type("last_name", $lastName);
$streetAddress = "100 Main Street";
+ $this->waitForElementPresent("street_address-1");
$this->type("street_address-1", $streetAddress);
$this->type("city-1", "San Francisco");
$this->type("postal_code-1", "94117");
$this->select("credit_card_exp_date[Y]", "value=2020");
//Billing Info
+ $this->waitForElementPresent("billing_first_name");
$this->type("billing_first_name", $firstName . "billing");
+ $this->waitForElementPresent("billing_last_name");
$this->type("billing_last_name", $lastName . "billing");
$this->type("billing_street_address-5", "15 Main St.");
$this->type(" billing_city-5", "San Jose");
$this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
$this->click("_qf_Confirm_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
// Log in using webtestLogin() method
$this->webtestLogin();
$this->clickLink("_qf_Main_upload-bottom", "_qf_Confirm_next-bottom");
$this->click("_qf_Confirm_next-bottom");
- $this->waitForPageToLoad($this->getTimeoutMsec());
$this->webtestLogin();
//Find Member
$this->waitForElementPresent('link=Add Membership Type');
$this->waitForText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
- $url = $this->getAttribute("xpath=//div[@id='membership_type']//div[@id='option11_wrapper']//table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
-
+ $this->waitForElementPresent("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
+ $url = $this->getAttribute("xpath=//div[@id='membership_type']/table/tbody//tr/td[1][text()='{$membershipTypeTitle}']/../td[12]/span/a[3][text()='Delete']/@href");
$matches = array();
preg_match('/id=([0-9]+)/', $url, $matches);
$membershipTypeId = $matches[1];
// create new membership types
$memTypeParams1 = $this->webtestAddMembershipType();
$memTypeTitle1 = $memTypeParams1['membership_type'];
- $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 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/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[1]/table/tbody//tr/td[text()='{$memTypeTitle2}']/../td[12]/span/a[3]@href"));
+ $memTypeId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='membership_type']/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 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");
+
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
+ $this->click("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
//View Contribution Record
$verifyData = array(
$this->webtestVerifyTabularData($verifyData);
$this->click("_qf_ContributionView_cancel-bottom");
- $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[@class='crm-accordion-wrapper']/div/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
}
/**