X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FEvent%2FPricesetMaxCountTest.php;h=1f1b38dcc2c2ca8cca461f6009a4f7cc8033cf37;hb=10525e4437a80b3f750037373d57a56888c45d82;hp=26cfd4316af93fbc103412a9c8e73e164dd96f11;hpb=21a3b46eba2d03213682bcb91ee5574b264f31aa;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php index 26cfd4316a..1f1b38dcc2 100644 --- a/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php +++ b/tests/phpunit/WebTest/Event/PricesetMaxCountTest.php @@ -1,7 +1,7 @@ webtestLogin(); @@ -170,7 +170,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->select("price_{$selectFieldId}", "value={$selectFieldOp1}"); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jones' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -198,7 +198,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { // exceed maximun count for text field, check for form rule $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -226,7 +226,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->_checkConfirmationAndRegister(); } - function testWithFieldCount() { + public function testWithFieldCount() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -366,7 +366,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -396,7 +396,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { // check for form rule $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -425,7 +425,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->_checkConfirmationAndRegister(); } - function testAdditionalParticipantWithoutFieldCount() { + public function testAdditionalParticipantWithoutFieldCount() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -564,7 +564,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '7'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -585,7 +585,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '6'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -606,7 +606,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -650,7 +650,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -681,7 +681,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -710,7 +710,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->_checkConfirmationAndRegister(); } - function testAdditionalParticipantWithFieldCount() { + public function testAdditionalParticipantWithFieldCount() { // Log in using webtestLogin() method $this->webtestLogin(); @@ -856,7 +856,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '7'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -877,7 +877,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '6'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -898,7 +898,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary Add 2'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -942,7 +942,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '3'); $this->type('first_name', 'Mary'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -973,7 +973,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@id='price_{$textFieldId}']", '2'); $this->type('first_name', 'Mary Add 1'); - $this->type('last_name', 'Jane'. substr(sha1(rand()), 0, 5)); + $this->type('last_name', 'Jane' . substr(sha1(rand()), 0, 5)); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; $this->type('email-Primary', $email); @@ -1006,7 +1006,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { * @param $setTitle * @param null $financialType */ - function _testAddSet($setTitle, $financialType = NULL) { + public function _testAddSet($setTitle, $financialType = NULL) { $this->openCiviPage('admin/price', 'reset=1&action=add', '_qf_Set_next-bottom'); // Enter Priceset fields (Title, Used For ...) @@ -1027,7 +1027,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { /** * @param $fields */ - function _testAddPriceFields($fields) { + public function _testAddPriceFields($fields) { $fieldCount = count($fields); $count = 1; $this->waitForElementPresent('label'); @@ -1074,6 +1074,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { else { $this->click('_qf_Field_next-bottom'); } + $this->waitForAjaxContent(); $this->waitForText('crm-notification-container', "Price Field '$label' has been saved."); $count++; @@ -1084,7 +1085,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { * @param $options * @param $fieldType */ - function _testAddMultipleChoiceOptions($options, $fieldType) { + public function _testAddMultipleChoiceOptions($options, $fieldType) { foreach ($options as $oIndex => $oValue) { $this->type("option_label_{$oIndex}", $oValue['label']); $this->type("option_amount_{$oIndex}", $oValue['amount']); @@ -1116,11 +1117,11 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { } /** - * @param $params + * @param array $params * * @return string */ - function _testAddEvent($params) { + public function _testAddEvent($params) { $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom'); $this->select('event_type_id', "value={$params['event_type_id']}"); @@ -1198,7 +1199,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { return $this->getLocation(); } - function _fillRegisterWithBillingInfo() { + public function _fillRegisterWithBillingInfo() { $this->waitForElementPresent('credit_card_type'); $this->select('credit_card_type', 'value=Visa'); $this->type('credit_card_number', '4111111111111111'); @@ -1217,7 +1218,7 @@ class WebTest_Event_PricesetMaxCountTest extends CiviSeleniumTestCase { $this->waitForPageToLoad($this->getTimeoutMsec()); } - function _checkConfirmationAndRegister() { + public function _checkConfirmationAndRegister() { $confirmStrings = array('Event Fee(s)', 'Billing Name and Address', 'Credit Card Information'); $this->assertStringsPresent($confirmStrings); $this->click('_qf_Confirm_next-bottom');