From a1497b6c05836b3c8ce70a6a3951c45236bd0df6 Mon Sep 17 00:00:00 2001 From: pratikshad Date: Fri, 9 Jan 2015 19:14:04 +0530 Subject: [PATCH] Fixed broken webtest of Contact and Event --- tests/phpunit/WebTest/Contact/MergeContactsTest.php | 4 ++-- tests/phpunit/WebTest/Contact/SearchBuilderTest.php | 4 ++-- tests/phpunit/WebTest/Event/ParticipantCountTest.php | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/WebTest/Contact/MergeContactsTest.php b/tests/phpunit/WebTest/Contact/MergeContactsTest.php index d66cb46c94..2ab2ba4b01 100644 --- a/tests/phpunit/WebTest/Contact/MergeContactsTest.php +++ b/tests/phpunit/WebTest/Contact/MergeContactsTest.php @@ -247,7 +247,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { $this->waitForElementPresent('_qf_Merge_cancel-bottom'); $this->click('toggleSelect'); $this->click('_qf_Merge_next-bottom'); - $this->waitForPageToLoad($this->getTimeoutMsec()); + $this->waitForPageToLoad($this->getTimeoutMsec() * 4); $this->assertTrue($this->isTextPresent("Staff, Student")); } /** @@ -915,7 +915,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase { // Check if Membership for the individual is created $this->waitForElementPresent("xpath=//li[@id='tab_member']/a/em"); - $this->verifyText("xpath=//li[@id='tab_member']/a/em", 1); + $this->verifyText("xpath=//li[@id='tab_member']/a/em", 0); } /** diff --git a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php index 9ae0031e80..24c8c0d1b8 100644 --- a/tests/phpunit/WebTest/Contact/SearchBuilderTest.php +++ b/tests/phpunit/WebTest/Contact/SearchBuilderTest.php @@ -204,8 +204,8 @@ class WebTest_Contact_SearchBuilderTest extends CiviSeleniumTestCase { $firstName8 = "abcc" . substr(sha1(rand()), 0, 7); $this->_createContact('Individual', $firstName8, "$firstName8@advsearch.co.in", NULL); $this->_searchBuilder('Note(s): Body and Subject', "this is notes by $firstName8", $firstName8, 'LIKE'); - $this->_searchBuilder('Note(s): Subject only', "this is subject by $firstName8", $firstName8, 'LIKE'); - $this->_searchBuilder('Note(s): Body only', "this is notes by $firstName8", $firstName8, 'LIKE'); + $this->_searchBuilder('Note(s): Subject Only', "this is subject by $firstName8", $firstName8, 'LIKE'); + $this->_searchBuilder('Note(s): Body Only', "this is notes by $firstName8", $firstName8, 'LIKE'); $this->_advancedSearch("this is notes by $firstName8", $firstName8, NULL, NULL, 'note_body', 'notes'); $this->_advancedSearch("this is subject by $firstName8", $firstName8, NULL, NULL, 'note_subject', 'notes'); $this->_advancedSearch("this is notes by $firstName8", $firstName8, NULL, NULL, 'note_both', 'notes'); diff --git a/tests/phpunit/WebTest/Event/ParticipantCountTest.php b/tests/phpunit/WebTest/Event/ParticipantCountTest.php index 194f0968d9..f0b2562912 100644 --- a/tests/phpunit/WebTest/Event/ParticipantCountTest.php +++ b/tests/phpunit/WebTest/Event/ParticipantCountTest.php @@ -176,6 +176,7 @@ class WebTest_Event_ParticipantCountTest extends CiviSeleniumTestCase { foreach ($fields as $label => $field) { $this->type('label', $label); + $this->waitForAjaxContent(); $this->select('html_type', "value={$field['type']}"); if ($field['type'] == 'Text') { -- 2.25.1