X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FEvent%2FEventWaitListTest.php;h=fc8c3ce515df436cb4c800eb7938a32b7b4d34b5;hb=f41a7de74d7f30125ad93e4b80561ac17038c002;hp=e2e35410a3c98bdf31c9dd71768af7197aa65212;hpb=6643a63b47c9607cdc5f14a739cf7c7cfe55d726;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Event/EventWaitListTest.php b/tests/phpunit/WebTest/Event/EventWaitListTest.php index e2e35410a3..fc8c3ce515 100644 --- a/tests/phpunit/WebTest/Event/EventWaitListTest.php +++ b/tests/phpunit/WebTest/Event/EventWaitListTest.php @@ -23,18 +23,22 @@ */ require_once 'CiviTest/CiviSeleniumTestCase.php'; + +/** + * Class WebTest_Event_EventWaitListTest + */ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { protected function setUp() { parent::setUp(); } - function testEventWaitList() { + public function testEventWaitList() { // Log in using webtestLogin() method $this->webtestLogin(); - // We need a payment processor - $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7); + // Use default payment processor + $processorName = 'Test Processor'; $this->webtestAddPaymentProcessor($processorName); $this->openCiviPage("event/add", "reset=1&action=add"); @@ -75,6 +79,7 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { $this->type("address_1_street_address", $streetAddress); $this->type("address_1_city", "San Francisco"); $this->type("address_1_postal_code", "94117"); + $this->select('address_1_country_id', 'United States'); $this->select("address_1_state_province_id", "value=1004"); $this->type("email_1_email", "info@civicrm.org"); @@ -119,6 +124,7 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { $this->assertChecked("is_multiple_registrations"); } + $this->click('intro_text-plain'); $this->fillRichTextField("intro_text", $registerIntro); // enable confirmation email @@ -149,7 +155,11 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { $this->assertStringsPresent("This event is currently full."); } - function _testVerifyEventInfo($eventTitle, $eventInfoStrings) { + /** + * @param $eventTitle + * @param $eventInfoStrings + */ + public function _testVerifyEventInfo($eventTitle, $eventInfoStrings) { // verify event input on info page // start at Manage Events listing $this->openCiviPage("event/manage", "reset=1"); @@ -159,7 +169,12 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { $this->assertStringsPresent($eventInfoStrings); } - function _testVerifyRegisterPage($registerStrings) { + /** + * @param $registerStrings + * + * @return string + */ + public function _testVerifyRegisterPage($registerStrings) { // Go to Register page and check for intro text and fee levels $this->click("link=Register Now"); $this->waitForElementPresent("_qf_Register_upload-bottom"); @@ -167,7 +182,12 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { return $this->getLocation(); } - function _testOnlineRegistration($registerUrl, $numberRegistrations = 1, $anonymous = TRUE) { + /** + * @param $registerUrl + * @param int $numberRegistrations + * @param bool $anonymous + */ + public function _testOnlineRegistration($registerUrl, $numberRegistrations = 1, $anonymous = TRUE) { if ($anonymous) { $this->webtestLogout(); } @@ -221,4 +241,3 @@ class WebTest_Event_EventWaitListTest extends CiviSeleniumTestCase { } } } -