$checkboxOptionLabel2 = 'check2' . substr(sha1(rand()), 0, 3);
$this->type("option_label_2", $checkboxOptionLabel2);
$this->type("option_value_2", "2");
- $this->click("link=another choice");
+ $this->click("link=add another choice");
$checkboxOptionLabel3 = 'check3' . substr(sha1(rand()), 0, 3);
$this->type("option_label_3", $checkboxOptionLabel3);
$this->type("option_value_3", "3");
- $this->click("link=another choice");
+ $this->click("link=add another choice");
$checkboxOptionLabel4 = 'check4' . substr(sha1(rand()), 0, 3);
$this->type("option_label_4", $checkboxOptionLabel4);
$this->type("option_value_4", "4");
// Fill Title
$title = 'Title' . substr(sha1(rand()), 0, 4);
+ $htmlMessage = "Schedule Reminder Test";
$this->type('title', $title);
// Fill Entity Details
// Fill Subject
$subject = 'subject' . substr(sha1(rand()), 0, 4);
$this->type('subject', $subject);
+ $this->waitForElementPresent("html_message");
+ $this->fillRichTextField("html_message", $htmlMessage);
//click on save
$this->click('_qf_ScheduleReminders_next-bottom');
$this->waitForElementPresent("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]/a");
// check that expected roles are listed in the Case Roles pane
foreach ($caseRoles as $role) {
- $this->assertText("css=div.crm-case-roles-block", $role);
+ $this->assertElementContainsText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[1]", $role);
}
// check that case creator role has been assigned to logged in user
- $this->verifyText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]", $creatorName);
+ $this->assertElementContainsText("xpath=//table[@id='caseRoles-selector-$id']/tbody/tr[4]/td[2]", $creatorName);
}
/**
$checkboxOptionLabel2 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
$this->type("option_label_2", $checkboxOptionLabel2);
$this->type("option_value_2", "2");
- $this->click("link=another choice");
+ $this->click("link=add another choice");
$checkboxOptionLabel3 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
$this->type("option_label_3", $checkboxOptionLabel3);
$this->type("option_value_3", "3");
$radioOptionLabel2 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
$this->type("option_label_2", $radioOptionLabel2);
$this->type("option_value_2", "2");
- $this->click("link=another choice");
+ $this->click("link=add another choice");
$radioOptionLabel3 = 'optionLabel_' . substr(sha1(rand()), 0, 5);
$this->type("option_label_3", $radioOptionLabel3);
$this->type("option_value_3", "3");
// Custom data
$this->click('css=div.crm-custom-set-block-1 .collapsible-title');
- // Because it tends to cause problems, all uses of sleep() must be justified in comments
- // NOTE: Sleep should never be used for wait for anything to load from the server
- // Justification for this instance: opening an accordion is predictable
- sleep(1);
+ $this->waitForAjaxContent();
$this->openInlineForm('custom-set-content-1');
- $dateFieldId = $this->getAttribute("xpath=//div[@class='crm-accordion-body']/table/tbody/tr[3]/td[@class='html-adjust']/input@id");
+ $dateFieldId = $this->getAttribute("xpath=//table[@class='form-layout-compressed']/tbody/tr[3]/td[@class='html-adjust']/span/input@id");
$this->inlineEdit('custom-set-content-1', array(
'CIVICRM_QFID_Edu_2' => 1,
- "//div[@class='crm-accordion-body']/table/tbody/tr[2]/td[@class='html-adjust']/select" => array('Single'),
+ "//table[@class='form-layout-compressed']/tbody/tr[2]/td[@class='html-adjust']/select" => array('Single'),
$dateFieldId => 'date: now - 10 years',
));
// add relationship "Employer of"
// click through to the relationship view screen
+ $this->waitForAjaxContent();
$this->click("css=li#tab_rel a");
// wait for add Relationship link
// add relationship "Employer of"
// click through to the relationship view screen
+ $this->waitForAjaxContent();
$this->click("css=li#tab_rel a");
// wait for add Relationship link
$this->waitForPageToLoad($this->getTimeoutMsec());
// click through to the relationship view screen
+ $this->waitForAjaxContent();
$this->click("css=li#tab_rel a");
// wait for add Relationship link
'Soft Credit Type' => $data['soft_credit_type'],
);
foreach ($expectedSoft as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
}
elseif ($type == "Membership") {
4 => 'New',
);
foreach ($expected as $label => $value) {
- $this->verifyText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=id('MembershipView')/div[2]/div/table[1]/tbody/tr[$label]/td[2]", $value);
}
//View Contribution
$this->waitForElementPresent("xpath=//form[@id='MembershipView']/div[2]/div/div[2]/div[2]/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
'Soft Credit Type' => $data['soft_credit_type'],
);
foreach ($expectedSoft as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
}
}
$this->waitForElementPresent("xpath=//*[@id='ContributionView']/div[2]");
foreach ($expected as $value) {
- $this->verifyText("xpath=//*[@id='ContributionView']/div[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=//*[@id='ContributionView']/div[2]", $value);
}
// verify if soft credit was created successfully
);
foreach ($expected as $value) {
- $this->verifyText("css=table.crm-soft-credit-listing", preg_quote($value));
+ $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
}
// go to first soft creditor contact view page
1 => "{$firstName} {$lastName}",
);
foreach ($expected as $value => $label) {
- $this->verifyText("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[2]/td[$value]", preg_quote($label));
+ $this->assertElementContainsText("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[2]/td[$value]", $label);
}
}
$this->waitForText("crm-notification-container", "The contribution record has been saved.");
// verify if Membership is created
- $this->waitForElementPresent("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]/table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
$contriID = $this->urlArg('id', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='Edit']@href"));
$contactID = $this->urlArg('cid', $this->getAttribute("xpath=//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='Edit']@href"));
//click through to the Membership view screen
- $this->click("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
+ $this->click("xpath=//form[@class='CRM_Contribute_Form_Search crm-search-form']//div[2]/table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span//a[text()='View']");
$this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
$expected = array(
'Contribution Status' => 'Pending',
);
foreach ($expected as $label => $value) {
- $this->verifyText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", preg_quote($value));
+ $this->assertElementContainsText("xpath=id('ContributionView')/div[2]/table[1]/tbody//tr/td[1][text()='$label']/../td[2]", $value);
}
}