From 2325644fd75d5f1496f9f27d2ad1d6d47a1a7edc Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 13 Aug 2013 14:38:52 +0530 Subject: [PATCH] fix the webtest --- tests/phpunit/WebTest/Event/TellAFriendTest.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/WebTest/Event/TellAFriendTest.php b/tests/phpunit/WebTest/Event/TellAFriendTest.php index 7e6b96563b..765c0e1ef6 100644 --- a/tests/phpunit/WebTest/Event/TellAFriendTest.php +++ b/tests/phpunit/WebTest/Event/TellAFriendTest.php @@ -71,8 +71,11 @@ class WebTest_Event_TellAFriendTest extends CiviSeleniumTestCase { $this->open($registerUrl); $this->waitForElementPresent('_qf_Register_upload-bottom'); - $firstName = substr(sha1(rand()), 0, 7); - $this->type('email-Primary', "$firstName@Anderson.com"); + $firstName = 'Jane' .substr(sha1(rand()), 0, 7); + $lastName = 'Doe' . substr(sha1(rand()), 0, 7); + $this->type('first_name', "$firstName"); + $this->type('last_name', "$lastName"); + $this->type('email-Primary', "$firstName@$lastName.com"); $this->click('_qf_Register_upload-bottom'); $this->waitForPageToLoad($this->getTimeoutMsec()); $this->click("css=div.crm-event-thankyou-form-block div#tell-a-friend a"); @@ -144,7 +147,7 @@ class WebTest_Event_TellAFriendTest extends CiviSeleniumTestCase { $this->waitForElementPresent('_qf_Activity_cancel-bottom'); $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[1]/td[2]", - preg_quote("$firstName@Anderson.com") + preg_quote("$lastName, $firstName") ); $this->verifyText("xpath=//table[@class='crm-info-panel']/tbody/tr[2]/td[2]/a[1]", -- 2.25.1