Change messages to wait instead of assert
[civicrm-core.git] / tests / phpunit / WebTest / Admin / CustomAddTest.php
index 80cb670156428f5d760c67b65ba8da3164388d46..96efbc184d5e408e90c809c79dfabb228c4ad042 100644 (file)
@@ -49,7 +49,7 @@ class WebTest_Admin_CustomAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom group created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
+    $this->waitForText('crm-notification-container', "Your custom field set '$customGroupTitle' has been added. You can add custom fields now.");
     //add custom field - alphanumeric text
     $textFieldLabel = 'test_text_field' . substr(sha1(rand()), 0, 3);
     $this->click("header");
@@ -97,7 +97,7 @@ class WebTest_Admin_CustomAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$checkboxFieldLabel' has been saved.");
 
     //create another custom field - Number Radio
     $this->click("data_type[0]");
@@ -133,7 +133,7 @@ class WebTest_Admin_CustomAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$radioFieldLabel' has been saved.");
 
     //On New Individual contact form
     $this->openCiviPage("contact/add", "ct=Individual&reset=1");