From 9ec352538df4375183384d26d82ebff2124f56fd Mon Sep 17 00:00:00 2001 From: Rohan Katkar Date: Wed, 29 Oct 2014 20:30:54 +0530 Subject: [PATCH] webtest fixes --- tests/phpunit/WebTest/Event/MultiprofileEventTest.php | 3 +++ tests/phpunit/WebTest/Profile/BatchUpdateTest.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php index 6d68e4dca9..75c892821a 100644 --- a/tests/phpunit/WebTest/Event/MultiprofileEventTest.php +++ b/tests/phpunit/WebTest/Event/MultiprofileEventTest.php @@ -672,6 +672,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $this->type("nick_name", "Nick"); $this->type("url-1", "http://www.test.com"); + $this->waitForElementPresent('street_address-Primary'); $this->type("street_address-Primary", "Primary street address"); $this->type("city-Primary", "primecity"); $this->type("phone-Primary-1", "98667764"); @@ -683,6 +684,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $this->type("middle_name", "xyz"); $this->click("name=gender_id value=2"); + $this->waitForElementPresent('participant_role'); $this->select("participant_role", "value=2"); $this->click("_qf_Register_upload-bottom"); @@ -703,6 +705,7 @@ class WebTest_Event_MultiprofileEventTest extends CiviSeleniumTestCase { $this->type("custom_" . $customId[1], "participant_custom1"); $this->type("custom_" . $customId[2], "participant_custom1"); + $this->waitForElementPresent('street_address-Primary'); $this->type("street_address-Primary", "Primary street address"); $this->type("city-Primary", "primecity"); $this->type("phone-Primary-1", "98667764"); diff --git a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php index d26423efdc..c2838f9f83 100644 --- a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php +++ b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php @@ -633,6 +633,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { //for checkbox 1 $this->waitForElementPresent("label"); $checkLabel1 = 'Custom Check One Text_' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $checkLabel1); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Alphanumeric"); @@ -664,6 +665,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { // create another custom field - Integer Radio //for checkbox 2 $checkLabel2 = 'Custom Check Two Text_' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $checkLabel2); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Alphanumeric"); @@ -691,6 +693,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { // create another custom field - Date $this->waitForElementPresent("label"); $dateFieldLabel = 'Custom Date Field' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $dateFieldLabel); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Date"); @@ -715,6 +718,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { //create rich text editor field $this->waitForElementPresent("label"); $richTextField = 'Custom Rich TextField_' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $richTextField); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Note"); @@ -731,6 +735,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { //for radio 1 $this->waitForElementPresent("label"); $radioLabel1 = 'Custom Radio One Text_' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $radioLabel1); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Alphanumeric"); @@ -759,6 +764,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { //for radio 2 $this->waitForElementPresent("label"); $radioLabel2 = 'Custom Radio Two Text_' . substr(sha1(rand()), 0, 4); + $this->waitForAjaxContent(); $this->type('label', $radioLabel2); $this->click('data_type[0]'); $this->select('data_type[0]', "label=Alphanumeric"); -- 2.25.1