Change messages to wait instead of assert
[civicrm-core.git] / tests / phpunit / WebTest / Member / OnlineMembershipAddPricesetTest.php
index 91985d7dc14338615384b7b293c23c59b3a657c9..675c5e54360a830acfe44374abbdcdac5baa6979 100644 (file)
@@ -157,7 +157,7 @@ class WebTest_Member_OnlineMembershipAddPricesetTest extends CiviSeleniumTestCas
     $this->waitForElementPresent('_qf_Field_next-bottom');
     $this->click('_qf_Field_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
+    $this->waitForText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
 
     // load the Price Set Preview and check for expected values
     $this->_testVerifyPriceSet($validateStrings, $sid);
@@ -206,7 +206,7 @@ class WebTest_Member_OnlineMembershipAddPricesetTest extends CiviSeleniumTestCas
 
     $this->assertChecked('is_active', 'Verify that Is Active checkbox is set.');
     $this->clickLink('_qf_Set_next-bottom', '_qf_Field_next-bottom');
-    $this->assertElementContainsText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
+    $this->waitForText('crm-notification-container', "Your Set '{$setTitle}' has been added. You can add fields to this set now.");
   }
 
   function _testAddPriceFields(&$fields, &$validateString, $dateSpecificFields = FALSE, $title, $sid, $contributionType) {
@@ -264,7 +264,7 @@ class WebTest_Member_OnlineMembershipAddPricesetTest extends CiviSeleniumTestCas
       }
       $this->select("financial_type_id", "label={$contributionType}");
       $this->clickLink('_qf_Field_next_new-bottom', '_qf_Field_next-bottom');
-      $this->assertElementContainsText('crm-notification-container', "Price Field '{$label}' has been saved.");
+      $this->waitForText('crm-notification-container', "Price Field '{$label}' has been saved.");
     }
     return array($memTypeTitle1, $memTypeTitle2);
   }