Merge pull request #9664 from konadave/CRM-19853
[civicrm-core.git] / tests / phpunit / WebTest / Admin / CustomAddTestSameField.php
index 0908a883612c91c672c43c89c5c1cc8e642b97ee..7739c2316c0ea37486acc09babb5656679f28048 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -69,6 +69,7 @@ class WebTest_Admin_CustomAddTestSameField extends CiviSeleniumTestCase {
     $this->openCiviPage('admin/custom/group/field/add', "reset=1&action=add&gid=$gid");
     $textFieldLabel = 'test_text_field';
     $this->click("header");
+    $this->waitForElementPresent('label');
     $this->type("label", $textFieldLabel);
     $this->click("_qf_Field_next_new-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
@@ -80,6 +81,7 @@ class WebTest_Admin_CustomAddTestSameField extends CiviSeleniumTestCase {
     $this->click("//option[@value='CheckBox']");
 
     $checkboxFieldLabel = 'test_checkbox';
+    $this->waitForElementPresent('label');
     $this->type("label", $checkboxFieldLabel);
     $checkboxOptionLabel1 = 'check1';
     $this->type("option_label_1", $checkboxOptionLabel1);
@@ -117,6 +119,7 @@ class WebTest_Admin_CustomAddTestSameField extends CiviSeleniumTestCase {
     //add custom field - alphanumeric text
     $textFieldLabel = 'test_text_field';
     $this->click("header");
+    $this->waitForElementPresent('label');
     $this->type("label", $textFieldLabel);
     $this->clickLink("_qf_Field_next_new-bottom");
 
@@ -139,6 +142,7 @@ class WebTest_Admin_CustomAddTestSameField extends CiviSeleniumTestCase {
     $this->click("//option[@value='Radio']");
 
     $radioFieldLabel = 'test_radio';
+    $this->waitForElementPresent('label');
     $this->type("label", $radioFieldLabel);
     $radioOptionLabel1 = 'radio1';
     $this->type("option_label_1", $radioOptionLabel1);