From: jitendrapurohit Date: Thu, 18 Sep 2014 12:44:04 +0000 (+0530) Subject: Batchupdate test fix to pass on jenkins X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=186e16a02a348235384a29eed3843c2c829ebab9;p=civicrm-core.git Batchupdate test fix to pass on jenkins --- diff --git a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php index 08bc6182f7..b85998cc00 100644 --- a/tests/phpunit/WebTest/Profile/BatchUpdateTest.php +++ b/tests/phpunit/WebTest/Profile/BatchUpdateTest.php @@ -659,10 +659,11 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->type("options_per_line", 2); //clicking save - $this->click('_qf_Field_next_new-top'); + $this->clickLink('_qf_Field_next_new-top', '_qf_Field_done-bottom', FALSE); //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$checkLabel1' has been saved."); + $this->waitForElementPresent("label"); $returnArray[1] = array($customGroupTitle, $checkLabel1); // create another custom field - Integer Radio @@ -686,13 +687,14 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->type('option_value_3', 3); //clicking save - $this->click('_qf_Field_next_new-top'); + $this->clickLink('_qf_Field_next_new-top', '_qf_Field_done-bottom', FALSE); //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$checkLabel2' has been saved."); $returnArray[2] = array($customGroupTitle, $checkLabel2); // create another custom field - Date + $this->waitForElementPresent("label"); $dateFieldLabel = 'Custom Date Field' . substr(sha1(rand()), 0, 4); $this->type('label', $dateFieldLabel); $this->click('data_type[0]'); @@ -710,12 +712,13 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->select('time_format', "value=2"); //clicking save - $this->click('_qf_Field_next_new-top'); + $this->clickLink('_qf_Field_next_new-top', '_qf_Field_done-bottom', FALSE); //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$dateFieldLabel' has been saved."); $returnArray[3] = array($customGroupTitle, $dateFieldLabel); //create rich text editor field + $this->waitForElementPresent("label"); $richTextField = 'Custom Rich TextField_' . substr(sha1(rand()), 0, 4); $this->type('label', $richTextField); $this->click('data_type[0]'); @@ -723,7 +726,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->select('data_type[1]', "label=RichTextEditor"); //clicking save - $this->click('_qf_Field_next_new-top'); + $this->clickLink('_qf_Field_next_new-top', '_qf_Field_done-bottom', FALSE); //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$richTextField' has been saved."); @@ -731,6 +734,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { //create radio button field //for radio 1 + $this->waitForElementPresent("label"); $radioLabel1 = 'Custom Radio One Text_' . substr(sha1(rand()), 0, 4); $this->type('label', $radioLabel1); $this->click('data_type[0]'); @@ -750,7 +754,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { $this->type('option_value_3', 3); //clicking save - $this->click('_qf_Field_next_new-top'); + $this->clickLink('_qf_Field_next_new-top', '_qf_Field_done-bottom', FALSE); //Is custom field created $this->waitForText('crm-notification-container', "Custom field '$radioLabel1' has been saved."); @@ -758,6 +762,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase { // create another custom field - Alpha Radio //for radio 2 + $this->waitForElementPresent("label"); $radioLabel2 = 'Custom Radio Two Text_' . substr(sha1(rand()), 0, 4); $this->type('label', $radioLabel2); $this->click('data_type[0]');