X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FEvent%2FParticipantCountTest.php;h=ef4d06dd3f39a40c1ddd08fd09dfadbdd957fa0b;hb=fe6a56117db7e9dada18e60f91de717a89013d86;hp=945e1e59dfaf659cbe5075c8c5ecf2d5355ce3c7;hpb=d10b2c65fedfc3bac77085a1639acc2188de2926;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index 945e1e59df..ef4d06dd3f 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -39,8 +39,8 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { // 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); // create an event @@ -106,15 +106,15 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // verify number of registered participants - $this->assertStringsPresent(array('2 Result')); + $this->assertTrue($this->isTextPresent('2 Results')); } function testParticipantCountWithPriceset() { // 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); // create priceset @@ -188,7 +188,8 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { else { $this->_testAddMultipleChoiceOptions($field['options']); } - $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."); } // create event. @@ -289,7 +290,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); // verify number of participants records and total participant count - $this->assertStringsPresent(array('2 Result', 'Actual participant count : 24')); + $this->assertStringsPresent(array('2 Results', 'Actual participant count : 24')); // CRM-7953, check custom search Price Set Details for Event // Participants @@ -330,7 +331,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } /** - * @param $params + * @param array $params * * @return string */ @@ -436,7 +437,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } /** - * @param $eventParams + * @param array $eventParams * @param $participants * @param $priceFieldOptionCounts */ @@ -447,7 +448,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->click('_qf_Custom_refresh-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); - $tableHeaders = array('Contact Id', 'Participant Id', 'Name'); + $tableHeaders = array('Contact ID', 'Participant ID', 'Name'); $tableHeaders = array_merge($tableHeaders, array_keys(current($priceFieldOptionCounts))); $tdnum = 2;