*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Event_ParticipantSearchTest
+ */
class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
protected function setUp() {
parent::setUp();
}
+ /**
+ * @param $strings
+ */
function _checkStrings(&$strings) {
// search for elements
foreach ($strings as $string) {
$this->openCiviPage("event/search", "reset=1");
$eventName = "Fall Fundraiser Dinner";
- $this->type("event_name", $eventName);
- $this->type("event_id", 1);
+ $this->select2("event_id", $eventName);
$this->click("_qf_Search_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->webtestFillDate('event_end_date_high', '+1 year');
$eventTypeName = 'Fundraiser';
- $this->type("event_type", $eventTypeName);
- $this->type("event_type_id", 3);
+ $this->select2("event_type_id", $eventTypeName);
$this->click("_qf_Search_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
// visit event search page
$this->openCiviPage("event/search", "reset=1");
- $this->click("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//label[contains(text(),'Chicken Combo')]");
+ $this->select("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//select", 'Chicken Combo');
$this->click("_qf_Search_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->_checkStrings($stringsToCheck);
- $this->click("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//label[contains(text(),'Salmon Stew')]");
+ $this->select("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//select", 'Salmon Stew');
$this->click("_qf_Search_refresh");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='View']");
$this->click("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='View']");
- $this->waitForElementPresent("_qf_ParticipantView_cancel-bottom");
+ $this->waitForTextPresent("View Event Registration");
// ensure we get to particpant view
$stringsToCheck = array(
- "View Participant",
- "Event Registration",
"Name",
"Event",
"Participant Role",
$this->waitForElementPresent("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='Edit']");
$this->click("xpath=id('participantSearch')/table/tbody/tr/td[11]/span/a[text()='Edit']");
- $this->waitForElementPresent("_qf_Participant_cancel-bottom");
+ $this->waitForTextPresent("Edit Event Registration");
// ensure we get to particpant view
$stringsToCheck = array(
- "Edit Event Registration",
"Participant",
"Event",
"Participant Role",