<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2018 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
default:
break;
}
- $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom');
+ $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom', FALSE);
$this->waitForText('crm-notification-container', "Price Field '" . $label . "' has been saved.");
}
}
$this->openCiviPage('admin/price', 'reset=1');
// Use the price set id ($sid) to pick the correct row
- $this->clickLink("//*[@id='price_set-{$sid}']/td[4]/span[1]/a[2]", '_qf_Preview_cancel-bottom');
+ $this->clickLink("//*[@id='price_set-{$sid}']/td[4]/span[1]/a[2]", '_qf_Preview_cancel-bottom', FALSE);
// Check for expected price set field strings
if ($this->isElementPresent("xpath=//*[@class ='select2-chosen']")) {
$this->click('link=Fees');
$this->waitForElementPresent('_qf_Fee_upload_done-bottom');
$this->click('CIVICRM_QFID_1_is_monetary');
- $this->click("xpath=//table[@id='paymentProcessor']/tbody/tr[1]/td[2]/label[text()='$processorName']");
+ $this->select2('payment_processor', $processorName, TRUE);
$this->select('financial_type_id', 'label=Event Fee');
$this->select('price_set_id', 'label=' . $setTitle);
$this->check('is_online_registration');
$this->assertChecked('is_online_registration');
- $this->click('intro_text-plain');
- $this->fillRichTextField('intro_text', $registerIntro);
+ $this->fillRichTextField('intro_text', $registerIntro, 'CKEditor', TRUE);
// enable confirmation email
$this->click('CIVICRM_QFID_1_is_email_confirm');
$this->click('link=Fees');
$this->waitForElementPresent('_qf_Fee_upload-bottom');
$this->click('CIVICRM_QFID_1_is_monetary');
- $this->click("xpath=//tr[@class='crm-event-manage-fee-form-block-payment_processor']/td[2]/label[text()='$processorName']");
+ $this->select2('payment_processor', $processorName, TRUE);
$this->select('financial_type_id', 'label=Event Fee');
$this->select('price_set_id', 'label=' . $setTitle);
$this->check('is_online_registration');
$this->assertChecked('is_online_registration');
- $this->click('intro_text-plain');
- $this->fillRichTextField('intro_text', $registerIntro);
+ $this->fillRichTextField('intro_text', $registerIntro, 'CKEditor', TRUE);
// enable confirmation email
$this->click('CIVICRM_QFID_1_is_email_confirm');
*/
public function testEventWithPriceSet() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
// Log in using webtestLogin() method
$this->webtestLogin();
$this->_testVerifyPriceSet($validateStrings, $sid);
$this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
-
+ $this->waitForElementPresent("_qf_EventInfo_upload-bottom");
$eventTitle = 'My Conference - ' . substr(sha1(rand()), 0, 7);
$email = 'Smith' . substr(sha1(rand()), 0, 7) . '@example.com';
$eventDescription = 'Here is a description for this conference.';
// Is status message correct?
$this->waitForText("crm-notification-container", "Event registration for $displayName has been added");
- $this->waitForElementPresent("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span//a[text()='View']");
//click through to the participant view screen
- $this->click("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//form[@id='Search']/table/tbody/tr[1]/td[8]/span//a[text()='View']");
$this->waitForElementPresent('_qf_ParticipantView_cancel-bottom');
$this->webtestVerifyTabularData(
$this->verifyText("xpath=//table/tbody/tr/td[text()='Fees']/following-sibling::td/table/tbody/tr[2]/td", preg_quote('$ 2,705.00'));
$expectedLineItems = array(
2 => array(
- 1 => 'Full Conference',
+ 1 => 'Full Conference ',
2 => '5',
3 => '$ 525.00',
4 => '$ 2,625.00',
4 => '$ 50.00',
),
4 => array(
- 1 => 'Evening Sessions - First Night',
+ 1 => 'Evening Sessions - First Night ',
2 => '1',
3 => '$ 15.00',
4 => '$ 15.00',
),
5 => array(
- 1 => 'Evening Sessions - Second Night',
+ 1 => 'Evening Sessions - Second Night ',
2 => '1',
3 => '$ 15.00',
4 => '$ 15.00',
$this->_checkLineItems($expectedLineItems);
// check contribution record as well
// click through to the contribution view screen
- $this->click("xpath=//*[@id='ParticipantView']/div[2]/table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span//a[text()='View']");
$this->waitForElementPresent('_qf_ContributionView_cancel-bottom');
$this->webtestVerifyTabularData(
'From' => $displayName,
'Financial Type' => 'Event Fee',
'Contribution Status' => 'Completed',
- 'Paid By' => 'Check',
+ 'Payment Method' => 'Check',
'Check Number' => '1044',
'Received Into' => 'Deposit Bank Account',
)
);
$this->verifyText("xpath=//td[text()='Contribution Amount']/following-sibling::td//div/div", preg_quote('Contribution Total: $ 2,705.00'));
+
+ // CRM-17182 - Rename the price option and check the same in Find Participants
+ $this->openCiviPage('admin/price/field', "reset=1&action=browse&sid={$sid}", 'newPriceField');
+ $this->click("xpath=//table[@id='options']/tbody/tr[3]/td[8]/a[text()='Edit Price Options']");
+ $this->waitForElementPresent("xpath=//span[contains(text(), 'Done')]");
+ $this->click("xpath=//table[@id='options']/tbody/tr/td/div[text()='First Night']/../following-sibling::td[8]/span//a[text()='Edit Option']");
+ $this->waitForElementPresent("_qf_Option_cancel");
+ $this->type('label', 'First Night Edited');
+ $this->click('_qf_Option_next');
+ $this->waitForText('crm-notification-container', "The option 'First Night Edited' has been saved.");
+
+ $this->openCiviPage('event/search', "reset=1", '_qf_Search_refresh');
+ $this->select2('participant_fee_id', 'First Night Edited');
+ $this->click('_qf_Search_refresh');
+ $this->waitForAjaxContent();
+ $this->clickLink("xpath=//form[@class='CRM_Event_Form_Search crm-search-form']//div[3]/div/div[2]//table//tbody/tr[1]/td[11]/span//a[text()='View']", "xpath=//span[contains(text(), 'Done')]", FALSE);
+ $expectedLineItems[4][1] = 'Evening Sessions - First Night Edited';
+ $this->_checkLineItems($expectedLineItems);
}
//check the delete for price field
$this->openCiviPage("admin/price/field", "reset=1&action=browse&sid={$sid}");
$this->waitForElementPresent("xpath=//table[@id='options']/tbody/tr/td[9]/span[2]");
- $this->click("xpath=//table[@id='options']/tbody/tr/td[9]/span[2]/ul/li[2]/a");
+ $this->click("xpath=//table[@id='options']/tbody/tr/td[9]/span[2]/ul[@class='panel']/li[2]//a[text()='Delete']");
//assert the message
$this->waitForText('price_set_used_by', "it is currently in use by one or more active events or contribution pages or contributions or event templates. If you no longer want to use this price set, click the event title below, and modify the fees for that event.");
//check the delete for priceset
$this->openCiviPage("admin/price", "reset=1");
$this->waitForElementPresent("xpath=//table[@class='display crm-price-set-listing dataTable no-footer']/tbody/tr/td[4]/span[2]");
- $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[4]/span[2]/ul/li[3]/a");
+ $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[4]/span[2]/ul/li[3]//a[text()='Delete']");
// Check confirmation alert.
$this->assertTrue((bool) preg_match("/^Are you sure you want to delete this price set?/",
$this->getConfirmation()