Merge pull request #209 from davecivicrm/CRM-12145
[civicrm-core.git] / tests / phpunit / WebTest / Profile / ProfileGroupSubscriptionTest.php
index 6f22496e88991fd286610e0651240665ec756d0b..e6020d0a44102d2aa5ec19b238af43999e349685 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'CiviTest/CiviSeleniumTestCase.php';
 class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase {
 
@@ -37,7 +36,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
 
     // Add new profile.
     $this->openCiviPage('admin/uf/group', 'reset=1');
-    
+
     $this->click('newCiviCRMProfile-top');
 
     $this->waitForElementPresent('_qf_Group_next-bottom');
@@ -69,7 +68,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //check for  profile create
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been added. You can add fields to this profile now.");
 
     //Add email field to profile
     $this->click('field_name[0]');
@@ -111,7 +110,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
 
     // check advisory group ( may be we should create a separate group to test this)
     $this->click("group_3");
-    
+
     $this->click('_qf_Edit_next');
 
     $this->waitForPageToLoad($this->getTimeoutMsec());
@@ -134,8 +133,7 @@ class WebTest_Profile_ProfileGroupSubscriptionTest extends CiviSeleniumTestCase
     $this->waitForElementPresent('_qf_Group_next-bottom');
     $this->click('_qf_Group_next-bottom');
     $this->waitForElementPresent('newCiviCRMProfile-bottom');
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile '{$profileTitle}' has been deleted.");
   }
 }
 
-