}
foreach ($expected as $label => $value) {
if ($xpathPrefix) {
+ $this->waitForElementPresent("xpath=//table{$tableLocator}/tbody/tr/td{$xpathPrefix}[text()='{$label}']/../following-sibling::td");
$this->verifyText("xpath=//table{$tableLocator}/tbody/tr/td{$xpathPrefix}[text()='{$label}']/../following-sibling::td", preg_quote($value), 'In line ' . __LINE__);
}
else {
+ $this->waitForElementPresent("xpath=//table{$tableLocator}/tbody/tr/td[text()='{$label}']/following-sibling::td");
$this->verifyText("xpath=//table{$tableLocator}/tbody/tr/td[text()='{$label}']/following-sibling::td", preg_quote($value), 'In line ' . __LINE__);
}
}
// Is new processor created?
$this->assertTrue($this->isTextPresent($processorName), 'Processor name not found in selector after adding payment processor (webTestAddPaymentProcessor).');
- $paymentProcessorId = explode('&id=', $this->getAttribute("xpath=//table[@class='selector']//tbody//tr/td[text()='{$processorName}']/../td[7]/span/a[1]@href"));
+ $paymentProcessorId = explode('&id=', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody//tr/td[text()='{$processorName}']/../td[7]/span/a[1]@href"));
$paymentProcessorId = explode('&', $paymentProcessorId[1]);
return $paymentProcessorId[0];
}
$this->click('honor_block_is_active');
$this->type('honor_block_title', "Honoree Section Title $hash");
$this->type('honor_block_text', "Honoree Introductory Message $hash");
- $this->select('crmasmSelect0', "label=Household");
+ $this->click("//*[@id='s2id_soft_credit_types']/ul");
+ $this->waitForElementPresent("//*[@id='select2-drop']/ul");
+ $this->waitForElementPresent("//*[@class='select2-result-label']");
+ $this->clickAt("//*[@class='select2-results']/li[1]");
}
// is confirm enabled? it starts out enabled, so uncheck it if false
$this->type('duration_interval', $duration_interval);
$this->select('duration_unit', "label={$duration_unit}");
- $this->select('period_type', "label={$period_type}");
+ $this->select('period_type', "value={$period_type}");
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$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=fixed");
+ $this->select('period_type', "value=fixed");
$this->waitForElementPresent('fixed_period_rollover_day[d]');
// fixed period start set to April 1
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertTrue($this->isTextPresent("The membership type 'Membership Type $title' has been saved."));
+ $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$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', 2);
$this->select('duration_unit', "label=year");
- $this->select('period_type', "label=fixed");
+ $this->select('period_type', "value=fixed");
$this->waitForElementPresent('fixed_period_rollover_day[d]');
$this->select('fixed_period_start_day[M]', 'value=9');
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertTrue($this->isTextPresent("The membership type 'Membership Type $title' has been saved."));
+ $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$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=fixed");
+ $this->select('period_type', "value=fixed");
$this->waitForElementPresent('fixed_period_rollover_day[d]');
$this->select('fixed_period_rollover_day[M]', 'value=10');
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertTrue($this->isTextPresent("The membership type 'Membership Type $title' has been saved."));
+ $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$firstName = "John_" . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent('_qf_MembershipType_cancel-bottom');
$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=fixed");
+ $this->select('period_type', "value=fixed");
$this->waitForElementPresent('fixed_period_rollover_day[d]');
$this->select('fixed_period_start_day[M]', 'value=1');
$this->click('_qf_MembershipType_upload-bottom');
$this->waitForElementPresent('link=Add Membership Type');
- $this->assertTrue($this->isTextPresent("The membership type 'Membership Type $title' has been saved."));
+ $this->waitForText('crm-notification-container',"The membership type 'Membership Type $title' has been saved.");
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
// Is status message correct?
$this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $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->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
// Is status message correct?
$this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $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->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
// Is status message correct?
$this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->waitForElementPresent("xpath=//div[@id='inactive-memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
// click through to the Membership Renewal Link
- $this->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='inactive-memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='Memberships']//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
$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->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $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->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
$this->waitForElementPresent('_qf_MembershipRenewal_cancel-bottom');
// Record contribution and set number of terms to 2
// save the renewed membership
$this->click('_qf_MembershipRenewal_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
// page was loaded
$this->waitForTextPresent($sourceText);
- $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
// click through to the membership view screen
- $this->click("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+ $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
$this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
function testProfileAddContactstoGroup() {
$this->webtestLogin();
+ $permissions = array("edit-1-profile-listings-and-forms");
+ $this->changePermissions($permissions);
// take group name and create group
$groupName = 'group_' . substr(sha1(rand()), 0, 7);
$this->WebtestAddGroup($groupName);
$profileTitle = 'profile_' . substr(sha1(rand()), 0, 7);
$this->type('title', $profileTitle);
+ $this->click('uf_group_type_Profile');
//Profile Advance Settings
$this->click("//form[@id='Group']/div[2]/div[2]/div[1]");
$this->type('title', $groupName);
$this->click('_qf_Search_refresh');
$this->waitForVisible('crm-group-selector_processing');
- $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(text(), '$groupName')]/following-sibling::td[@class='crm-group-group_links']/span/a");
- $this->clickLink("xpath=//table[@id='crm-group-selector']/tbody/tr/td[1][text()= '$groupName']/following-sibling::td[@class='crm-group-group_links']/span/a");
+ $this->waitForElementPresent("xpath=//table[@id='crm-group-selector']/tbody/tr/td[contains(., '$groupName')]/following-sibling::td[@class='crm-group-group_links']/span/a");
+ $this->clickLink("xpath=//table[@id='crm-group-selector']/tbody/tr/td[1][contains(., '$groupName')]/following-sibling::td[@class='crm-group-group_links']/span/a");
$contactEmails = array(
1 => "$lastName1, $firstName1",
2 => "$lastName2, $firstName2"