// Set Communication Prefs
$this->inlineEdit('crm-communication-pref-content', array(
- 'css=#email_greeting_display a' => TRUE,
+ 'email_greeting_id' => TRUE,
'privacy_do_not_email' => 1,
'preferred_communication_method_1' => 1,
'preferred_communication_method_2' => 1,
case 'string':
if ($val && substr($val, 0, 5) == 'date:') {
$val = date('m/d/Y', strtotime(trim(substr($val, 5))));
- $item .= '_display';
+ $item = "xpath=//input[starts-with(@id, '{$item}_display_')]";
}
if ($val) {
$this->assertElementValueEquals($item, $val);
$this->waitForElementPresent("_qf_Batch_next");
$this->click("title");
$this->type("title", $batchTitle);
- $this->select("type_id", "Pledge");
+ $this->select("type_id", "Pledge Payment");
$this->type("item_count", $itemCount);
$this->type("total", 200);
$this->click("_qf_Batch_next");
'Financial Type' => $fields['values'][$fields['id']]['financial_type'],
'Contribution Amount' => $fields['values'][$fields['id']]['total_amount'],
'Contribution Status' => $fields['values'][$fields['id']]['contribution_status'],
- 'Paid By' => $fields['values'][$fields['id']]['contribution_payment_instrument'],
+ 'Paid By' => $fields['values'][$fields['id']]['payment_instrument'],
'Check Number' => $fields['values'][$fields['id']]['contribution_check_number'],
);
//Participant Status
$this->openCiviPage("admin/participant_status", "reset=1&action=browse");
- $this->_testEnableParticipantStatuses('Awaiting approval');
- $this->isElementPresent("xpath=//td[@class='crm-particpant-label'][contains(text(), 'Awaiting approval')]/../td[9]/span/a[2][text()='Disable']");
- $this->_testEnableParticipantStatuses('Pending from approval');
- $this->isElementPresent("xpath=//td[@class='crm-particpant-label'][contains(text(), 'Pending from approval')]/../td[9]/span/a[2][text()='Disable']");
- $this->_testEnableParticipantStatuses('Rejected');
- $this->isElementPresent("xpath=//td[@class='crm-particpant-label'][contains(text(), 'Rejected')]/../td[9]/span/a[2][text()='Disable']");
+ foreach (array('Awaiting approval', 'Pending from approval', 'Rejected') as $label) {
+ $status = $this->webtest_civicrm_api("ParticipantStatusType", "getsingle", array('label' => $label));
+ $this->_testEnableParticipantStatuses($status['id']);
+ $this->isElementPresent("xpath=//tr[@id='participant_status_type-{$status['id']}']/td[9]/span/a[2][text()='Disable']");
+ }
//Create New Event
/**
* @param $status
*/
- public function _testEnableParticipantStatuses($status) {
+ public function _testEnableParticipantStatuses($statusId) {
// enable participant status
- if ($this->isElementPresent("xpath=//td[@class='crm-participant-label crm-editable crm-editable-enabled'][contains(text(), '{$status}')]/../td[9]/span/a[2][text()='Enable']")) {
- $this->click("xpath=//td[@class='crm-participant-label crm-editable crm-editable-enabled'][contains(text(), '{$status}')]/../td[9]/span/a[2][text()='Enable']");
- $this->waitForElementPresent("xpath=//td[@class='crm-participant-label crm-editable crm-editable-enabled'][contains(text(), '{$status}')]/../td[9]/span/a[2][text()='Disable']");
+ if ($this->isElementPresent("xpath=//tr[@id='participant_status_type-{$statusId}']/td[9]/span/a[2][text()='Enable']")) {
+ $this->click("xpath=//tr[@id='participant_status_type-{$statusId}']/td[9]/span/a[2][text()='Enable']");
+ $this->waitForElementPresent("xpath=//tr[@id='participant_status_type-{$statusId}']/td[9]/span/a[2][text()='Disable']");
}
}