From 1eb0391e367ae6f832f9dc42137ea819307de0f0 Mon Sep 17 00:00:00 2001 From: kurund Date: Wed, 14 Aug 2013 03:52:12 +0530 Subject: [PATCH] fixes for WebTest_Event_ParticipantCountTest --- .../WebTest/Event/ParticipantCountTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index 220397e6a6..afaa0e0403 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -32,7 +32,6 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { } function testParticipantCountWithFeelevel() { - // Log in using webtestLogin() method $this->webtestLogin(); @@ -69,6 +68,8 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->click("xpath=//input[@class='form-radio']"); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; + $this->type('first_name', 'Mary'); + $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register @@ -84,6 +85,8 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->click("xpath=//input[@class='form-radio']"); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; + $this->type('first_name', 'Mary'); + $this->type('last_name', 'Jones'. substr(sha1(rand()), 0, 5)); $this->type('email-Primary', $email); // fill billing details and register @@ -217,14 +220,16 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@class='form-text four required']", '1'); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; - $this->type('email-Primary', $email); - $participants[1] = array( 'email' => $email, 'first_name' => 'Jane_' . substr(sha1(rand()), 0, 5), 'last_name' => 'San_' . substr(sha1(rand()), 0, 5), ); + $this->type('first_name', $participants[1]['first_name']); + $this->type('last_name', $participants[1]['last_name']); + $this->type('email-Primary', $email); + // fill billing related info and register $this->_testRegisterWithBillingInfo($participants[1]); @@ -249,7 +254,6 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { $this->type("xpath=//input[@class='form-text four required']", '2'); $email = 'jane_' . substr(sha1(rand()), 0, 5) . '@example.org'; - $this->type('email-Primary', $email); $participants[2] = array( 'email' => $email, @@ -257,6 +261,10 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { 'last_name' => 'San_' . substr(sha1(rand()), 0, 5), ); + $this->type('first_name', $participants[2]['first_name']); + $this->type('last_name', $participants[2]['last_name']); + $this->type('email-Primary', $email); + // fill billing related info and register $this->_testRegisterWithBillingInfo($participants[2]); -- 2.25.1