Change messages to wait instead of assert
authorColeman Watts <coleman@civicrm.org>
Wed, 20 Mar 2013 23:17:38 +0000 (16:17 -0700)
committerColeman Watts <coleman@civicrm.org>
Wed, 20 Mar 2013 23:17:38 +0000 (16:17 -0700)
65 files changed:
tests/phpunit/CiviTest/CiviSeleniumTestCase.php
tests/phpunit/WebTest/ACL/AssignUsersToRolesTest.php
tests/phpunit/WebTest/Activity/ContactContextAddTest.php
tests/phpunit/WebTest/Activity/IcalTest.php
tests/phpunit/WebTest/Admin/CustomAddTest.php
tests/phpunit/WebTest/Admin/MoveCustomDataTest.php
tests/phpunit/WebTest/Admin/RelationshipTypeAddTest.php
tests/phpunit/WebTest/Campaign/ActivityTest.php
tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php
tests/phpunit/WebTest/Campaign/MailingTest.php
tests/phpunit/WebTest/Campaign/MembershipTest.php
tests/phpunit/WebTest/Campaign/OfflineContributionTest.php
tests/phpunit/WebTest/Campaign/OnlineContributionTest.php
tests/phpunit/WebTest/Campaign/OnlineEventRegistrationTest.php
tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php
tests/phpunit/WebTest/Case/ActivityToCaseTest.php
tests/phpunit/WebTest/Case/AddCaseTest.php
tests/phpunit/WebTest/Contact/AddTest.php
tests/phpunit/WebTest/Contact/AdvanceSearchPrivacyOptionsTest.php
tests/phpunit/WebTest/Contact/AdvancedSearchTest.php
tests/phpunit/WebTest/Contact/AdvancedSearchedRelatedContactTest.php
tests/phpunit/WebTest/Contact/ContactReferenceFieldTest.php
tests/phpunit/WebTest/Contact/CustomDataAddTest.php
tests/phpunit/WebTest/Contact/DeceasedContactsAdvancedSearchTest.php
tests/phpunit/WebTest/Contact/DupeContactTest.php
tests/phpunit/WebTest/Contact/GroupAddTest.php
tests/phpunit/WebTest/Contact/MergeContactsTest.php
tests/phpunit/WebTest/Contact/MultipleContactSubTypes.php
tests/phpunit/WebTest/Contact/PrevNextTest.php
tests/phpunit/WebTest/Contact/SignatureTest.php
tests/phpunit/WebTest/Contact/TagSetSearchTest.php
tests/phpunit/WebTest/Contact/TaskActionAddToGroupTest.php
tests/phpunit/WebTest/Contact/TaskActionSendSMS.php
tests/phpunit/WebTest/Contribute/ContactContextAddTest.php
tests/phpunit/WebTest/Contribute/OnBehalfOfOrganization.php
tests/phpunit/WebTest/Event/AddEventTest.php
tests/phpunit/WebTest/Event/AddParticipationTest.php
tests/phpunit/WebTest/Export/ContactTest.php
tests/phpunit/WebTest/Financial/FinancialAccountTypeTest.php
tests/phpunit/WebTest/Grant/CustomFieldsetTest.php
tests/phpunit/WebTest/Import/AddressImportTest.php
tests/phpunit/WebTest/Import/DuplicateMatchingTest.php
tests/phpunit/WebTest/Import/MatchExternalIdTest.php
tests/phpunit/WebTest/Mailing/AddMessageTemplateTest.php
tests/phpunit/WebTest/Mailing/AddNewMailingComponentTest.php
tests/phpunit/WebTest/Mailing/MailingTest.php
tests/phpunit/WebTest/Member/BatchUpdateViaProfileTest.php
tests/phpunit/WebTest/Member/ContactContextAddTest.php
tests/phpunit/WebTest/Member/InheritedMembershipTest.php
tests/phpunit/WebTest/Member/OfflineMembershipAddPricesetTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php
tests/phpunit/WebTest/Member/OnlineMembershipAddPricesetTest.php
tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php
tests/phpunit/WebTest/Member/SeperateMembershipPaymentTest.php
tests/phpunit/WebTest/Member/UpdateMembershipScriptTest.php
tests/phpunit/WebTest/Pledge/ContactContextAddTest.php
tests/phpunit/WebTest/Pledge/ContactContextPledgePaymentAddTest.php
tests/phpunit/WebTest/Pledge/StandaloneAddDeleteTest.php
tests/phpunit/WebTest/Pledge/StandaloneAddTest.php
tests/phpunit/WebTest/Profile/BatchUpdateTest.php
tests/phpunit/WebTest/Profile/DedupeTest.php
tests/phpunit/WebTest/Profile/MultiRecordProfileAddTest.php
tests/phpunit/WebTest/Profile/ProfileAddTest.php
tests/phpunit/WebTest/Profile/ProfileGroupSubscriptionTest.php
tests/phpunit/WebTest/Profile/SearchTest.php

index 0d17dd40bdc66310a155b5a8de8002695544db20..c90b66ade396c9bdb03fb1f38ad2c3268459bd15 100644 (file)
@@ -268,7 +268,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
     if ($added) {
       $this->click("_qf_Component_next-bottom");
       $this->waitForPageToLoad($this->getTimeoutMsec());
-      $this->assertElementContainsText("crm-notification-container", "Saved");
+      $this->waitForText('crm-notification-container', "Saved");
     }
   }
 
@@ -1226,7 +1226,7 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase {
     $this->clickLink('_qf_Edit_upload-bottom');
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "$groupName");
+    $this->waitForText('crm-notification-container', "$groupName");
     return $groupName;
   }
 
index fa456256e42c667f20f7b7fbdaf91934dff6d68b..ad4ddbfa2de4347216436982c04a263a01d68909 100755 (executable)
@@ -42,23 +42,22 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase {
     $this->click("_qf_Edit_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "The Group '{$groupTitle}' has been saved.");
+    $this->waitForText('crm-notification-container', "The Group '{$groupTitle}' has been saved.");
 
     $this->openCiviPage("admin/options/acl_role", "group=acl_role&action=add&reset=1", "_qf_Options_cancel-bottom");
 
     $label = "TestAclRole" . substr(sha1(rand()), 0, 4);
     $this->type("label", $label);
-    $this->click("_qf_Options_next-bottom");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "The Acl Role '{$label}' has been saved");
+    $this->clickLink("_qf_Options_next-bottom");
+
+    $this->waitForText('crm-notification-container', "The Acl Role '{$label}' has been saved");
 
     $this->openCiviPage("acl/entityrole", "action=add&reset=1");
 
     $this->select("acl_role_id", "label=" . $label);
     $this->select("entity_id", "label={$groupTitle}");
 
-    $this->click("_qf_EntityRole_next-botttom");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("_qf_EntityRole_next-botttom");
 
     $this->openCiviPage("acl", "action=add&reset=1");
     $this->click("group_id");
@@ -66,8 +65,7 @@ class WebTest_ACL_AssignUsersToRolesTest extends CiviSeleniumTestCase {
     $this->select("operation", "label=View");
     $this->select("entity_id", "label={$label}");
     $this->type("name", "describe {$label}");
-    $this->click("_qf_ACL_next-bottom");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("_qf_ACL_next-bottom");
   }
 }
 
index 301fea6434a90be0c541f5c8a93dd4d66fbc40e4..8a06cebaa98c46dffb664db6c70c214fa8e66112 100644 (file)
@@ -78,7 +78,7 @@ class WebTest_Activity_ContactContextAddTest extends CiviSeleniumTestCase {
 
     // Since we're here, let's check if screen help is being displayed properly
 
-    $this->assertElementContainsText('css=tr.crm-activity-form-block-assignee_contact_id td span.description', 'You can optionally assign this activity to someone', 'Help text is missing.');
+    $this->assertElementContainsText('css=tr.crm-activity-form-block-assignee_contact_id', 'You can optionally assign this activity to someone', 'Help text is missing.');
     // Putting the contents into subject field - assigning the text to variable, it'll come in handy later
     $subject = "This is subject of test activity being added through activity tab of contact summary screen.";
     // For simple input fields we can use field id as selector
@@ -117,7 +117,7 @@ class WebTest_Activity_ContactContextAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving.");
+    $this->waitForText('crm-notification-container', $subject);
 
     $this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[9]/span/a[text()='View']");
 
index 32a35a2d920497180f9bccf2e6d9047828a36bdc..4c42993be72346c1c34744dc19ea68a7f7b369b6 100644 (file)
@@ -84,7 +84,7 @@ class WebTest_Activity_IcalTest extends CiviSeleniumTestCase {
         $this->click("_qf_Activity_upload");
         $this->waitForPageToLoad($this->getTimeoutMsec());
 
-        $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving!");
+        $this->waitForText('crm-notification-container', $subject);
 
         // check the resulting email
         $mail = $mailer->getMostRecentEmail('ezc');
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");
index c4772b1d7b5a9db94568ea13755d4183cab60bf4..3af6fa56f2c33cd891f2bf24ad92749d1779e2fe 100644 (file)
@@ -123,7 +123,7 @@ class WebTest_Admin_MoveCustomDataTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //assert that the success text is present
-    $this->assertElementContainsText('crm-notification-container', "has been moved", "Move field success message not displayed");
+    $this->waitForText('crm-notification-container', "has been moved");
 
     //assert that the custom field not on old data set page
 
@@ -210,7 +210,7 @@ class WebTest_Admin_MoveCustomDataTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Field_cancel-bottom");
 
     //Is custom group created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.", "Group title missing");
+    $this->waitForText('crm-notification-container', "Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now.");
 
     $url = $this->parseURL();
     $group_id = $url['queryString']['gid'];
@@ -343,7 +343,7 @@ class WebTest_Admin_MoveCustomDataTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$fieldLabel' has been saved.", "Field was not created successfully");
+    $this->waitForText('crm-notification-container', "Your custom field '$fieldLabel' has been saved.");
 
     //get the custom id of the custom field that was just created
     $results = $this->webtest_civicrm_api("CustomField", "get", array('label' => $fieldLabel, 'custom_group_id' => $group_id));
@@ -417,7 +417,7 @@ class WebTest_Admin_MoveCustomDataTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //assert success
-    $this->assertElementContainsText('crm-notification-container', "has been updated", "Contact Record could not be saved");
+    $this->waitForText('crm-notification-container', "has been updated");
   }
 }
 
index a6e265333b21855da8a222ce1b103faac8a7bf48..fa1cf8b415a68a15af4cf73bc3b1688ee0ddc201 100644 (file)
@@ -60,9 +60,7 @@ class WebTest_Admin_RelationshipTypeAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //does data saved.
-    $this->assertElementContainsText('crm-notification-container', 'The Relationship Type has been saved.',
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', 'The Relationship Type has been saved.');
 
     //validate data.
     $data = array(
@@ -98,9 +96,7 @@ class WebTest_Admin_RelationshipTypeAddTest extends CiviSeleniumTestCase {
 
     $this->click('_qf_RelationshipType_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', 'Relationship Label-A to B is a required field.',
-      'Required form rule for Label A - B seems to be broken.'
-    );
+    $this->waitForText('crm-notification-container', 'Relationship Label-A to B is a required field.');
 
     //enter the relationship type values.
     $labelAB = 'Test Relationship Type A - B - DUPLICATE TO BE' . rand();
@@ -122,9 +118,7 @@ class WebTest_Admin_RelationshipTypeAddTest extends CiviSeleniumTestCase {
     $this->click('_qf_RelationshipType_next-bottom');
 
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', 'Label already exists in Database.',
-      'Unique relationship type label form rule seems to be broken.'
-    );
+    $this->waitForText('crm-notification-container', 'Label already exists in Database.');
   }
 }
 
index ac48a1c0b2455280b1dbfcb5b33b49da37fb1fa4..f9315dd7b69398f431398c47a1366a7a9f990de4 100644 (file)
@@ -102,10 +102,7 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
     $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
@@ -195,11 +192,10 @@ class WebTest_Campaign_ActivityTest extends CiviSeleniumTestCase {
     $this->type("followup_activity_subject", "This is subject of schedule follow-up activity");
 
     // Clicking save.
-    $this->click("_qf_Activity_upload");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("_qf_Activity_upload");
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.", "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', $subject);
 
     $this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[1]/td[9]/span/a[text()='View']");
 
index a712596381f2725b85e64657eea0acd6c60e1167..a12087da182cb4ee42662a084184919708d1ea27 100644 (file)
@@ -74,9 +74,7 @@ class WebTest_Campaign_CampaignDescriptionTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     //Opening Edit Page of the created Campaign
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody//tr/td[text()='{$campaignTitle}']/../td[13]/span/a[text()='Edit']");
index 0a7955ed419c8bd2f12225d2a0b363d82246b9c3..bf403308acdf7bae8d094d0ba0a56cb6cf7dd0cd 100644 (file)
@@ -91,9 +91,7 @@ class WebTest_Campaign_MailingTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
     $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
index f62db6bd2de2673b21a05a3ef77c73aa6a5c97fb..2ee8a4df5a13a943388dbda80e035aa77121ff0a 100644 (file)
@@ -100,9 +100,7 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
     $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
index 702b04d4080237483aceaae43cf6a0e735426f09..75b5232b8f26553fb0952bee2afaeafd3152bcc0 100644 (file)
@@ -107,9 +107,7 @@ class WebTest_Campaign_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign $campaignTitle has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("xpath=//div[@id='campaignList']/div[@id='campaigns_wrapper']/table[@id='campaigns']/tbody//tr/td[text()='$campaignTitle']");
     $url = explode('id=', $this->getAttribute("xpath=//div[@id='campaignList']/div[@id='campaigns_wrapper']/table[@id='campaigns']/tbody//tr/td[text()='$campaignTitle']/../td[13]/span/a[text()='Edit']@href"));
@@ -209,7 +207,7 @@ class WebTest_Campaign_OfflineContributionTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved");
 
     $this->waitForElementPresent("xpath=//div[@id='Contributions']//table/tbody/tr/td[8]/span/a[text()='View']");
 
index 686a02ff4a9d33686729dc93747f99a526ff69c6..7295ce81aa19fc83f61d1f90f75584df8329f442 100644 (file)
@@ -105,9 +105,7 @@ class WebTest_Campaign_OnlineContributionTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
     $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
index 90fa187aabc4c80b5c0635a30690b0898663b2fd..2f7ec65ad20851d7c4b5de2ad04ea772604d05ce 100644 (file)
@@ -102,9 +102,7 @@ class WebTest_Campaign_OnlineEventRegistrationTest extends CiviSeleniumTestCase
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Campaign Campaign $title has been saved.",
-      "Status message didn't show up after saving campaign!"
-    );
+    $this->waitForText('crm-notification-container', "Campaign $title");
 
     $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
     $id = (int) $this->getText("//div[@id='campaignList']/div[@class='dataTables_wrapper']/table/tbody/tr/td[text()='{$campaignTitle}']/../td[1]");
@@ -187,11 +185,10 @@ class WebTest_Campaign_OnlineEventRegistrationTest extends CiviSeleniumTestCase
     $this->select("address_1_state_province_id", "value=1004");
     $this->type("email_1_email", "info@civicrm.org");
 
-    $this->click("_qf_Location_upload-bottom");
+    $this->clickLink("_qf_Location_upload-bottom");
 
     // Wait for "saved" status msg
-    $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->waitForTextPresent("'Location' information has been saved.");
+    $this->waitForText('crm-notification-container', "saved");
   }
 
   function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorId) {
@@ -221,7 +218,7 @@ class WebTest_Campaign_OnlineEventRegistrationTest extends CiviSeleniumTestCase
 
     // Wait for "saved" status msg
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->waitForTextPresent("'Fee' information has been saved.");
+    $this->waitForText('crm-notification-container', "saved");
   }
 
   function _testAddOnlineRegistration($registerIntro, $multipleRegistrations = FALSE) {
@@ -245,7 +242,7 @@ class WebTest_Campaign_OnlineEventRegistrationTest extends CiviSeleniumTestCase
 
     $this->click("_qf_Registration_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->waitForTextPresent("'Registration' information has been saved.");
+    $this->waitForText('crm-notification-container', "saved");
   }
 
   function _testVerifyEventInfo($eventTitle, $eventInfoStrings) {
index e640d8fa5427ec26ad1aa8c23f606496632c319a..72d2bc4e00dfa6c641f3b1e400ed00ba28817633 100644 (file)
@@ -99,7 +99,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->click("_qf_Campaign_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText("crm-notification-container", "$title");
+    $this->waitForText('crm-notification-container', "$title");
 
     // create a custom data set for activities -> survey
     $this->openCiviPage('admin/custom/group', "action=add&reset=1", "_qf_Group_next-bottom");
@@ -133,7 +133,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->click("_qf_Field_next-bottom");
 
     $this->waitForElementPresent("newCustomField");
-    $this->assertElementContainsText("crm-notification-container", "$title");
+    $this->waitForText('crm-notification-container', "$title");
 
     // create a profile for campaign
     $this->openCiviPage("admin/uf/group/add", "action=add&reset=1", "_qf_Group_next-bottom");
@@ -145,7 +145,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->click("_qf_Group_next-bottom");
 
     $this->waitForElementPresent("_qf_Field_next-bottom");
-    $this->assertElementContainsText("crm-notification-container", "$title");
+    $this->waitForText('crm-notification-container', "$title");
 
     // add a profile field for activity
     $this->select("field_name[0]", "value=Activity");
@@ -154,7 +154,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
 
     $this->click("_qf_Field_next-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText("crm-notification-container", "$title");
+    $this->waitForText('crm-notification-container', "$title");
 
     // create a survey
     $this->openCiviPage("survey/add", "reset=1", "_qf_Main_upload-bottom");
@@ -197,7 +197,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->type("//input[@id='option_value_2']", "2");
     $this->click('_qf_Results_upload_done-bottom');
     $this->waitForElementPresent("//div[@id='search_form_survey']");
-    $this->assertElementContainsText("crm-notification-container", "Results");
+    $this->waitForText('crm-notification-container', "Results");
 
     // Reserve Respondents
     $this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
@@ -214,7 +214,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
     $this->click("_qf_Reserve_done_reserve-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText("crm-notification-container", "2");
+    $this->waitForText('crm-notification-container', "2");
 
     // Interview Respondents
     $this->openCiviPage("survey/search", "reset=1&op=interview", "_qf_Search_refresh");
@@ -273,7 +273,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Reserve_done_reserve-bottom");
     $this->click("_qf_Reserve_done_reserve-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText("crm-notification-container", "Contact(s) have been reserved");
+    $this->waitForText('crm-notification-container', "Contact(s) have been reserved");
 
     // Release Respondents
     $this->openCiviPage("survey/search", "reset=1&op=release", "_qf_Search_refresh");
@@ -289,7 +289,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("Go");
     $this->clickLink("Go", "_qf_Release_done-bottom");
     $this->clickLink("_qf_Release_done-bottom", 'access');
-    $this->assertElementContainsText("crm-notification-container", "released");
+    $this->waitForText('crm-notification-container', "released");
 
     // check whether contact is available for reserving again
     $this->openCiviPage("survey/search", "reset=1&op=reserve", "_qf_Search_refresh");
@@ -359,7 +359,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->select('extends[0]', "value=Contact");
     $this->click('_qf_Group_next-bottom');
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
-    $this->assertElementContainsText("crm-notification-container", $customGroup);
+    $this->waitForText('crm-notification-container', $customGroup);
 
     // Add custom fields
     $field1 = "Checkbox $title";
@@ -387,7 +387,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
 
     $this->click('_qf_Field_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText("crm-notification-container", $field1);
+    $this->waitForText('crm-notification-container', $field1);
 
     // Create a profile for survey
     $this->openCiviPage("admin/uf/group", "reset=1");
@@ -399,7 +399,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->type('title', $surveyProfile);
     $this->click('_qf_Group_next-bottom');
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
-    $this->assertElementContainsText("crm-notification-container", $surveyProfile);
+    $this->waitForText('crm-notification-container', $surveyProfile);
 
     // Add fields to the profile
     // Phone ( Primary )
@@ -491,7 +491,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Reserve_done_reserve-bottom');
 
     $this->clickLink('_qf_Reserve_done_reserve-bottom', 'access');
-    $this->assertElementContainsText("crm-notification-container", "2");
+    $this->waitForText('crm-notification-container', "2");
 
     $this->openCiviPage("report/survey/detail", "reset=1", '_qf_SurveyDetails_submit');
 
index 6b0f1599abd82617d718f423d8a8eeb06ad4c940..6f069c3aaa50897e5ca105fb004d00719a5391cc 100644 (file)
@@ -76,7 +76,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->clickLink('_qf_Case_upload-bottom', '_qf_CaseView_cancel-bottom');
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Case opened successfully.", "Save successful status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "Case opened successfully.");
     $customGroupTitle = 'Custom_' . substr(sha1(rand()), 0, 7);
 
     $this->_testAddNewActivity($firstName, $subject, $customGroupTitle, $contactName);
@@ -167,9 +167,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Activity '$subject' has been saved.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', $subject);
 
     // click through to the Activity view screen
     $this->waitForElementPresent("xpath=//div[@id='Activities']//table/tbody/tr[2]/td[9]");
@@ -244,7 +242,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
 
     //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.");
 
     // create a custom field - Integer Radio
     $this->click("data_type[0]");
@@ -280,7 +278,7 @@ class WebTest_Case_ActivityToCaseTest 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.");
 
     // create another custom field - text field
     $this->click("//a[@id='newCustomField']/span");
@@ -303,7 +301,7 @@ class WebTest_Case_ActivityToCaseTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
     $textFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$textFieldLabel']/../../td[8]/span/a[text()='Edit Field']/@href"));
     $textFieldId = $textFieldId[1];
 
index 8b8746e3a4f81eecbe1db1d8471ffda9ab36102c..13350f1ff3393866d28c186112f5e3158f11b53f 100644 (file)
@@ -98,7 +98,7 @@ class WebTest_Case_AddCaseTest extends CiviSeleniumTestCase {
     $this->clickLink("_qf_Case_upload-bottom", "_qf_CaseView_cancel-bottom");
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Case opened successfully.", "Save successful status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "Case opened successfully.");
 
     $summaryStrings = array(
       "Case Summary",
index 5116b0afc3e2472d908f09e3c706a62a6b6b8c51..254e6f5327efc6b0a8712dd8b957d61836e6ab25 100644 (file)
@@ -164,7 +164,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
 
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
   }
 
   function testHouseholdAdd() {
@@ -268,7 +268,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
   }
 
   function testOrganizationAdd() {
@@ -367,7 +367,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
   }
 
   function testIndividualAddWithSharedAddress() {
@@ -428,9 +428,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Edit_next");
 
     // Is new contact created?
-    $this->assertElementContainsText('crm-notification-container', "$currentEmployer has been created.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "$currentEmployer has been created.");
 
     //make sure shared address is selected
     $this->waitForElementPresent('selected_shared_address-1');
@@ -460,9 +458,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Edit_next");
 
     // Is new contact created?
-    $this->assertElementContainsText('crm-notification-container', "$sharedHousehold has been created.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "$sharedHousehold has been created.");
 
     //make sure shared address is selected
     $this->waitForElementPresent('selected_shared_address-2');
@@ -471,7 +467,7 @@ class WebTest_Contact_AddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $name = $this->getText("xpath=//div[@class='crm-summary-display_name']");
-    $this->assertElementContainsText('crm-notification-container',  "$name has been created.");
+    $this->waitForText('crm-notification-container',  "$name has been created.");
 
     //make sure current employer is set
     $this->verifyText("xpath=id('contactinfo-block')/div/div/div[2]/div", 'Employer');
index 4d4b14722b510d1816b3ff39dcea08e2fd85d88c..0f486cc8bfbdd944e7c93c56887eb24176eebfc2 100644 (file)
@@ -199,7 +199,7 @@ class WebTest_Contact_AdvanceSearchPrivacyOptionsTest extends CiviSeleniumTestCa
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
+    $this->waitForText('crm-notification-container', "{$firstName} {$lastName} has been created.");
 
   }
 }
index b1e05f53983e44175742d56ad8ee33060bcc9f3b..ea89df791e45b900aaedb82a9bdb7ffe98d27561 100644 (file)
@@ -66,7 +66,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
 
     // is status message correct?
     $this->waitForTextPresent("Saved");
-    $this->assertElementContainsText('crm-notification-container', "Saved");
+    $this->waitForText('crm-notification-container', "Saved");
 
     // go to event tab and register for event ( auto add activity and contribution )
     $this->click("css=li#tab_participant a");
@@ -84,7 +84,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
     $this->type("trxn_id", "trid$firstName");
     $this->click("_qf_Participant_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Event registration for $firstName adv$firstName has been added");
+    $this->waitForText('crm-notification-container', "Event registration for $firstName adv$firstName has been added");
 
     // go to pledge tab and add pledge
     $this->click("css=li#tab_pledge a");
@@ -98,7 +98,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
     $this->click("_qf_Pledge_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     // go to Membership tab and add membership
     $this->click("css=li#tab_member a");
@@ -113,7 +113,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
     $this->click("_qf_Membership_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Student membership for $firstName adv$firstName has been added");
+    $this->waitForText('crm-notification-container', "Student membership for $firstName adv$firstName has been added");
 
     // go to relationship tab and add relationship
     $this->click("css=li#tab_rel a");
@@ -127,7 +127,7 @@ class WebTest_Contact_AdvancedSearchTest extends CiviSeleniumTestCase {
     $this->webtestFillDate("end_date", "+1 day");
     $this->click("details-save");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "New relationship created.");
+    $this->waitForText('crm-notification-container', "New relationship created.");
 
     //-------------- advance search --------------
 
index 50e58ffcbf24a560b9dce4550b76d08bf1d864a5..a780e84285fcba0f4897a9051a636b623872362a 100644 (file)
@@ -131,8 +131,8 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
     $this->click("_qf_AddToGroup_next-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Added Contacts to ".$groupName);
-    $this->assertElementContainsText('crm-notification-container', '2 contacts added to group');
+    $this->waitForText('crm-notification-container', "Added Contacts to ".$groupName);
+    $this->waitForText('crm-notification-container', '2 contacts added to group');
     $this->_testSearchResult($relType);
   }
 
@@ -178,7 +178,7 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
 
     // Wait for "saved" status msg
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "'Location' information has been saved.");
+    $this->waitForText('crm-notification-container', "'Location' information has been saved.");
   }
 
   function _testAddFees($discount = FALSE, $priceSet = FALSE, $processorId) {
@@ -250,7 +250,7 @@ class WebTest_Contact_AdvancedSearchedRelatedContactTest extends CiviSeleniumTes
     $this->waitForElementPresent("current-relationships");
 
     //check the status message
-    $this->assertElementContainsText('crm-notification-container', "New relationship created.");
+    $this->waitForText('crm-notification-container', "New relationship created.");
 
     $this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
     $this->click("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
index fb219d8851863b3f2e715ac42381ffc3c23b3bc8..9929cecf2a4d94bd8c3a2502e78f3b17d98a6c00 100644 (file)
@@ -63,7 +63,7 @@ class WebTest_Contact_ContactReferenceFieldTest extends CiviSeleniumTestCase {
     $this->select('group_id', "label={$groupName}");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Individual 1
     $contact2 = substr(sha1(rand()), 0, 7);
@@ -92,7 +92,7 @@ class WebTest_Contact_ContactReferenceFieldTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Field_cancel-bottom");
 
     //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.");
 
     $matches = array();
     preg_match('/gid=([0-9]+)/', $this->getLocation(), $matches);
@@ -112,7 +112,7 @@ class WebTest_Contact_ContactReferenceFieldTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$contactRefFieldLabel1' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$contactRefFieldLabel1' has been saved.");
 
     //add custom field - alphanumeric checkbox
     $contactRefFieldLabel2 = 'contact_ref_' . substr(sha1(rand()), 0, 4);
@@ -131,7 +131,7 @@ class WebTest_Contact_ContactReferenceFieldTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$contactRefFieldLabel2' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$contactRefFieldLabel2' has been saved.");
 
     $this->openCiviPage('admin/custom/group/field', "reset=1&action=browse&gid={$customGroupId}");
 
index 7403bf6be9c39c3a3d1574f4abfcb39fed88c319..073fc63973d6ff0e96a4738114a908cb65e8c32e 100644 (file)
@@ -49,7 +49,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Field_cancel-bottom");
 
     //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 checkbox
     $checkboxFieldLabel = 'custom_field' . substr(sha1(rand()), 0, 4);
@@ -86,7 +86,7 @@ class WebTest_Contact_CustomDataAddTest 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 - Integer Radio
     $this->click("//a[@id='newCustomField']/span");
@@ -128,7 +128,7 @@ class WebTest_Contact_CustomDataAddTest 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.");
 
     // Go to the URL to create an Individual contact.
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -173,7 +173,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent("_qf_Field_cancel-bottom");
 
     //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 - money text
     $moneyTextFieldLabel = 'money' . substr(sha1(rand()), 0, 4);
@@ -200,7 +200,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created?
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$moneyTextFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$moneyTextFieldLabel' has been saved.");
 
     //Get the customFieldsetID
     $this->openCiviPage('admin/custom/group', 'reset=1');
@@ -256,7 +256,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->click("id=collapse_display");
     $this->click("id=_qf_Group_next-bottom");
     $this->waitForElementPresent('_qf_Field_next-bottom');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field set '$customFieldSet' has been added.");
+    $this->waitForText('crm-notification-container', "Your custom field set '$customFieldSet' has been added.");
 
     // Add field to fieldset
     $customField = 'CustomField' . rand();
@@ -264,7 +264,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->select("id=data_type_0", "value=0");
     $this->click("id=_qf_Field_next-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$customField' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$customField' has been saved.");
 
     $this->openCiviPage('contact/add', 'reset=1&ct=Individual');
 
@@ -311,7 +311,7 @@ class WebTest_Contact_CustomDataAddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "{$firstName} {$lastName} has been created.");
+    $this->waitForText('crm-notification-container', "{$firstName} {$lastName} has been created.");
 
     //Update the custom field
     $this->click("css=a.edit.button");
index 5e43f93162a828a968db6c4450b3d5e3f4f94cb3..4ab45cb5fb034f8ec6bb567d497fe2d97f309a03 100644 (file)
@@ -73,7 +73,7 @@ class WebTest_Contact_DeceasedContactsAdvancedSearchTest extends CiviSeleniumTes
     $this->select('group_id', "label={$groupName}");
     $this->click('_qf_RemoveFromGroup_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "2 contacts removed from '{$groupName}'");
+    $this->waitForText('crm-notification-container', "2 contacts removed from '{$groupName}'");
 
     // Search for the contacts who are not deceased
     $this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
index 40c5627d1a4a1e2b47473fe45f8b6baeafad4652..81560ef0dbc7d9cb36bccf9ca0d3cd313592a80d 100644 (file)
@@ -62,7 +62,7 @@ class WebTest_Contact_DupeContactTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     $this->openCiviPage('contact/add' , 'reset=1&ct=Individual');
 
index d65a98c267c03236a78c0b971e8332fb108c21a1..eda91d4040b9e52f9cd169dca27c7ee1c152a5d5 100644 (file)
@@ -65,7 +65,7 @@ class WebTest_Contact_GroupAddTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
+    $this->waitForText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
 
     $this->openCiviPage('group', 'reset=1');
     $this->type('title', $params['name']);
index 9ba0fb64a70b7e0d96aa0ce7a4781fa02eac241c..8826cecd2dbba28df5e957d8324a12e719fdeda0 100644 (file)
@@ -62,7 +62,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Add Contact to a group
     $group = 'Newsletter Subscribers';
@@ -71,7 +71,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->select('group_id', "label=$group");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Add Tags to the contact
     $tag = 'Government Entity';
@@ -104,7 +104,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Add second pair of dupes so we can test Merge and Goto Next Pair
     $fname2 = 'Janet';
@@ -122,7 +122,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Find and Merge Contacts with Supervised Rule
     $this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
@@ -301,7 +301,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // contact2: duplicate of contact1.
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -325,7 +325,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Find and Merge Contacts with Supervised Rule
     $this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
@@ -390,7 +390,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // contact2: duplicate of contact1.
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -414,7 +414,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Find and Merge Contacts with Supervised Rule
     $this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew");
@@ -496,7 +496,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     //Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     //duplicate of contact2.
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -523,7 +523,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // add contact3 and its duplicate
     //fill in first name
@@ -554,7 +554,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->chooseOkOnNextConfirmation();
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->waitForElementPresent('civicrm-footer');
-    $this->assertElementContainsText('crm-notification-container', "safe mode");
+    $this->waitForText('crm-notification-container', "safe mode");
 
     // If we are still on the dedupe table page, count unmerged contacts
     if ($this->isElementPresent("//table[@class='pagerDisplay']")) {
@@ -611,7 +611,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     //duplicate of above contact.
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -632,7 +632,7 @@ class WebTest_Contact_MergeContactsTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent("One matching contact was found. You can View or Edit the existing contact."));
     $this->click("_qf_Contact_upload_duplicate");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
   }
 }
 
index 60f471f88edf808b8ee79e519b656304cdb01b3d..0f727a945c0b5e18278bc7d101ce42aa3250922c 100644 (file)
@@ -167,7 +167,7 @@ class WebTest_Contact_MultipleContactSubTypes extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //checking the contact sub-type of newly created individual
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
     $this->assertElementContainsText('css=.crm-contact_type_label', "Student");
     $this->assertElementContainsText('css=.crm-contact_type_label', "Parent");
 
@@ -202,7 +202,7 @@ class WebTest_Contact_MultipleContactSubTypes extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Verify contact types
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
     $this->assertElementNotContainsText('css=.crm-contact_type_label', "Student");
     $this->assertElementContainsText('css=.crm-contact_type_label', "Staff");
     $this->assertElementContainsText('css=.crm-contact_type_label', "Parent");
index cc4fef680e5652518865567188d52db2cf22e362..3767c37b9bcadc4e46e6c15f71c001e52865135f 100644 (file)
@@ -63,7 +63,7 @@ class WebTest_Contact_PrevNextTest extends CiviSeleniumTestCase {
     $this->select('group_id', "label={$groupName}");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Individual 2
     $contact2 = substr(sha1(rand()), 0, 7);
@@ -75,7 +75,7 @@ class WebTest_Contact_PrevNextTest extends CiviSeleniumTestCase {
     $this->select('group_id', "label={$groupName}");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Individual 3
     $contact3 = substr(sha1(rand()), 0, 7);
@@ -87,7 +87,7 @@ class WebTest_Contact_PrevNextTest extends CiviSeleniumTestCase {
     $this->select('group_id', "label={$groupName}");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Search contacts
     $this->openCiviPage('contact/search', 'reset=1', '_qf_Basic_refresh');
index 4abf33fb5997450329567381f74e8496339cb3fb..f0704b70b2141bb59c500b27dfb2c2d1a999a56a 100644 (file)
@@ -63,7 +63,7 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     // Go for Ckeck Your Editor, Click on Send Mail
     $this->click("//a[@id='crm-contact-actions-link']/span");
@@ -119,7 +119,7 @@ class WebTest_Contact_SignatureTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText("crm-notification-container", "{$name} has been updated.");
+    $this->waitForText('crm-notification-container', "{$name} has been updated.");
 
     // Go for Ckeck Your Editor, Click on Send Mail
     $this->click("//a[@id='crm-contact-actions-link']/span");
index f02bf56b7bf2482d996fe801f16e51b027ecb848..3ea97bbb7cd109bf130ea4096c04c7a480c742e3 100644 (file)
@@ -154,7 +154,7 @@ class WebTest_Contact_TagSetSearchTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The tag '$tagSetName' has been saved.");
+    $this->waitForText('crm-notification-container', "The tag '$tagSetName' has been saved.");
 
     // sort by ID desc
     $this->click("xpath=//table//tr/th[text()=\"ID\"]");
index 372f9e56d88b16883da664e3c2eaa2e17a1cfafa..7f744157fad7d11e934a8656ae76ad8d04fcf826 100644 (file)
@@ -83,8 +83,8 @@ class WebTest_Contact_TaskActionAddToGroupTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Check status messages are as expected
-    $this->assertElementContainsText('crm-notification-container', "Added Contacts to {$newGroupName}");
-    $this->assertElementContainsText('crm-notification-container', "2 contacts added to group");
+    $this->waitForText('crm-notification-container', "Added Contacts to {$newGroupName}");
+    $this->waitForText('crm-notification-container', "2 contacts added to group");
 
     // Search by group membership in newly created group
     $this->openCiviPage('contact/search/advanced', 'reset=1');
@@ -130,8 +130,8 @@ class WebTest_Contact_TaskActionAddToGroupTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Check status messages are as expected
-    $this->assertElementContainsText('crm-notification-container', "Added Contacts to {$newGroupName}");
-    $this->assertElementContainsText('crm-notification-container', "50 contacts added to group");
+    $this->waitForText('crm-notification-container', "Added Contacts to {$newGroupName}");
+    $this->waitForText('crm-notification-container', "50 contacts added to group");
 
     $this->openCiviPage('contact/search/advanced', 'reset=1');
     $this->select("crmasmSelect1", "label=" . $newGroupName);
index 6881b08a4d4eb925e4e3fc704f4bf52044ad9845..f37765e3cc117cc00bbdc1bd0746c84ae388e740 100644 (file)
@@ -61,14 +61,14 @@ class WebTest_Contact_TaskActionSendSMS extends CiviSeleniumTestCase {
 
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     $this->click('css=li#tab_group a');
     $this->waitForElementPresent('_qf_GroupContact_next');
     $this->select('group_id', "label=$smsGroupName");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // ADD contact2
     $this->openCiviPage("contact/add", "reset=1&ct=Individual");
@@ -85,14 +85,14 @@ class WebTest_Contact_TaskActionSendSMS extends CiviSeleniumTestCase {
 
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     $this->click('css=li#tab_group a');
     $this->waitForElementPresent('_qf_GroupContact_next');
     $this->select('group_id', "label=$smsGroupName");
     $this->click('_qf_GroupContact_next');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Added to Group");
+    $this->waitForText('crm-notification-container', "Added to Group");
 
     // Do an advanced search
     $this->click("css=ul#civicrm-menu li.crm-Search");
index 2ad020aecd43587a6a251f0a84742e6128ffa782..46b1fbe7a55e461db95ca584e111d53a88905416 100644 (file)
@@ -147,7 +147,7 @@ class WebTest_Contribute_ContactContextAddTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->clickLink("_qf_Contribution_upload-bottom", 'civicrm-footer');
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved");
 
     $this->waitForElementPresent("xpath=//div[@id='Contributions']//table/tbody/tr/td[8]/span/a[text()='View']");
 
index 05f2a0e8c624aa84f8396f0100796cd76897067f..a7a42b2fde81b0268ad6a3c01522f576175e4214 100644 (file)
@@ -1369,7 +1369,7 @@ class WebTest_Contribute_OnBehalfOfOrganization extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $this->click('_qf_Field_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Selected Profile Field has been deleted.");
+    $this->waitForText('crm-notification-container', "Selected Profile Field has been deleted.");
   }
 
   function _testOrganizationWithImageUpload($pageId, $cid, $pageTitle) {
index 49e5af62fd20c609ac346b9e5ce0eefa1dc987d0..00108118baa9dfaf526640988fc5e7bd67f2865d 100644 (file)
@@ -451,7 +451,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase {
 
     // Wait for "saved" status msg
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText("crm-notification-container", "'Fee' information has been saved");
+    $this->waitForText('crm-notification-container', "'Fee' information has been saved");
     return array($discount1, $discount2);
   }
 
index cd9662087785d8d6eac831ee991991c4d29b0d86..792de9a2d77a80985118bb15817571511c98366b 100644 (file)
@@ -89,7 +89,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText("crm-notification-container", "Event registration for $displayName has been added", "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "Event registration for $displayName has been added");
 
     $this->waitForElementPresent("xpath=//div[@id='Events']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
     //click through to the participant view screen
@@ -158,7 +158,7 @@ class WebTest_Event_AddParticipationTest 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 checkbox
     $checkboxFieldLabel = 'custom_field' . substr(sha1(rand()), 0, 4);
@@ -195,7 +195,7 @@ class WebTest_Event_AddParticipationTest 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 - Integer Radio
     $this->click("//a[@id='newCustomField']/span");
@@ -286,7 +286,7 @@ class WebTest_Event_AddParticipationTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText("crm-notification-container", "Event registration for $displayName has been added", "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "Event registration for $displayName has been added");
 
     $this->waitForElementPresent("xpath=//div[@id='Events']//table//tbody/tr[1]/td[8]/span/a[text()='View']");
     //click through to the participant view screen
index 6f17c4f2f3769ee06ac223bff23afb0bcef65a3f..34173855a7594ec8405873a13abac33c42f6b8ff 100644 (file)
@@ -325,6 +325,6 @@ class WebTest_Export_ContactTest extends ExportCiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+    $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
   }
 }
index 76a55d9853f0ed764e92107cb26ff25f3936e8de..d7af5d48545db144794b5f9207b2ab0f597155a5 100644 (file)
@@ -112,27 +112,21 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase {
     $this->click('_qf_FinancialTypeAccount_next_new');
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $text = 'The financial type Account has been saved.';
-    $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
-    $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+    $this->waitForText('crm-notification-container', $text);
     $text = 'You can add another Financial Account Type.';
-    $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
-    $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+    $this->waitForText('crm-notification-container', $text);
     $accountRelationship = 'Expense Account is';
     $expected[] = array(
-
       'financial_account' => 'Banking Fees',
-
       'account_relationship' => $accountRelationship
-
     );
 
     $this->select('account_relationship', "label={$accountRelationship}");
     $this->select('financial_account_id', "label=Banking Fees");
     $this->click('_qf_FinancialTypeAccount_next');
-    $this->waitForElementPresent( 'newfinancialTypeAccount');
+    $this->waitForElementPresent('newfinancialTypeAccount');
     $text = 'The financial type Account has been saved.';
-    $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
-    $this->assertTrue($this->isTextPresent($text), 'Missing text: ' . $text);
+    $this->waitForText('crm-notification-container', $text);
 
     foreach ($expected as  $value => $label) {
       $this->verifyText("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='$label[financial_account]']/../td[2]", preg_quote($label['account_relationship']));
@@ -156,7 +150,7 @@ class WebTest_Financial_FinancialAccountTypeTest extends CiviSeleniumTestCase {
     $this->clickLink("xpath=id('ltype')/div/table/tbody/tr/td[1][text()='Accounts Receivable']/../td[7]/span/a[text()='Delete']", '_qf_FinancialTypeAccount_next-botttom');
     $this->click('_qf_FinancialTypeAccount_next-botttom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', 'Selected financial type account has been deleted.', 'Missing text: ' . 'Selected financial type account has been deleted.');
+    $this->waitForText('crm-notification-container', 'Selected financial type account has been deleted.');
 
     //edit financial type
     $financialType['oldname'] = $financialType['name'];
index 9e30f38f42d64dfc7afd3ea38410a4910d05a6a0..fbb602d29ab2a49990b7ed5779e7d4b2d001df07 100644 (file)
@@ -56,7 +56,7 @@ class WebTest_Grant_CustomFieldsetTest extends CiviSeleniumTestCase {
     $this->type('id=label', $grantType);
     $this->click('id=_qf_Options_next-top');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "The Grant Type '$grantType' has been saved.");
+    $this->waitForText('crm-notification-container', "The Grant Type '$grantType' has been saved.");
 
     // Create new Custom Field Set that extends the grant type
     $this->openCiviPage('admin/custom/group', 'reset=1');
@@ -69,7 +69,7 @@ class WebTest_Grant_CustomFieldsetTest extends CiviSeleniumTestCase {
     $this->click('id=collapse_display');
     $this->click('id=_qf_Group_next-bottom');
     $this->waitForElementPresent('_qf_Field_next-bottom');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field set '$grantFieldSet' has been added.");
+    $this->waitForText('crm-notification-container', "Your custom field set '$grantFieldSet' has been added.");
 
     // Add field to fieldset
     $grantField = 'GrantField' . $rand;
@@ -77,7 +77,7 @@ class WebTest_Grant_CustomFieldsetTest extends CiviSeleniumTestCase {
     $this->select('id=data_type_0', 'label=Money');
     $this->click('id=_qf_Field_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$grantField' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$grantField' has been saved.");
 
     // Create new Grant
     $this->openCiviPage('grant/add', 'reset=1&action=add&context=standalone', '_qf_Grant_upload-bottom');
index 1489cff4cf012e162db7a42d354b55c4c59b804e..92d089649f2968b78657247f2db8a6b60012e684 100644 (file)
@@ -118,7 +118,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
 
     //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.");
     $url = explode('gid=', $this->getLocation());
     $gid = $url[1];
 
@@ -130,7 +130,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
 
-    $this->assertElementContainsText('crm-notification-container',"Your custom field '{$customField}' has been saved.");
+    $this->waitForText('crm-notification-container',"Your custom field '{$customField}' has been saved.");
     $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href"));
     $customFieldId = $customFieldId[1];
 
@@ -144,7 +144,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     // clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField1}' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '{$customField1}' has been saved.");
     $customFieldId1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField1']/../../td[8]/span/a@href"));
     $customFieldId1 = $customFieldId1[1];
 
@@ -158,7 +158,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     // clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField2}' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '{$customField2}' has been saved.");
     $customFieldId2 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField2']/../../td[8]/span/a@href"));
     $customFieldId2 = $customFieldId2[1];
 
@@ -208,7 +208,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     // clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField9}' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '{$customField9}' has been saved.");
     $customFieldId9 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField9']/../../td[8]/span/a@href"));
     $customFieldId9 = $customFieldId9[1];
 
@@ -223,7 +223,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     // clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customField10}' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '{$customField10}' has been saved.");
     $customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']/../../td[8]/span/a@href"));
     $customFieldId10 = $customFieldId10[1];
 
@@ -283,7 +283,7 @@ class WebTest_Import_AddressImportTest extends ImportCiviSeleniumTestCase {
     // clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForElementPresent('newCustomField');
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '{$customFieldName}' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '{$customFieldName}' has been saved.");
     $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customFieldName']/../../td[8]/span/a@href"));
     $customFieldId = $customFieldId[1];
     return $customFieldId;
index 7e3acb9537c0ef3ad6d192293d95726144cf6eb4..9039233947ed1ebfc73b42046678edd456034671 100644 (file)
@@ -55,7 +55,7 @@ class WebTest_Import_DuplicateMatchingTest extends ImportCiviSeleniumTestCase {
     // Clicking save.
     $this->click('_qf_Contact_upload_view');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     $existingContact = array(
       'first_name' => $firstName,
index a462daef32a09728e89b1dd3f18764b21b77bb9c..3f0d105f4e49a18e246b50cd6cb7604c6fcdab94 100644 (file)
@@ -244,7 +244,7 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Contact Saved");
+    $this->waitForText('crm-notification-container', "Contact Saved");
 
     return $externalId;
   }
@@ -335,7 +335,7 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
 
     $this->click("_qf_Registration_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Saved");
+    $this->waitForText('crm-notification-container', "Saved");
 
     // verify event input on info page
     // start at Manage Events listing
index 30db0e4f6ce3094ab7dc80859d8bf750787b2d18..02282de0dfd212c0365e634954c33ed4a3e5234c 100644 (file)
@@ -83,7 +83,7 @@ class WebTest_Mailing_AddMessageTemplateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct
-    $this->assertElementContainsText('crm-notification-container', "The Message Template '$msgTitle' has been saved.");
+    $this->waitForText('crm-notification-container', "The Message Template '$msgTitle' has been saved.");
 
     // Verify text.
     $this->assertTrue($this->isElementPresent("xpath=id('user')/div[2]/div/table/tbody//tr/td[1][contains(text(), '$msgTitle')]"),
index 5de23b0fff0327719847d8ef77cf1115905bb935..9c1c3ec8579b7c8eafb20c0075aa16a687b3cbea 100644 (file)
@@ -62,7 +62,7 @@ class WebTest_Mailing_AddNewMailingComponentTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct.
-    $this->assertElementContainsText('crm-notification-container', "The mailing component '$componentName' has been saved.");
+    $this->waitForText('crm-notification-container', "The mailing component '$componentName' has been saved.");
 
     // Verify text.
     $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Header']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
@@ -99,7 +99,7 @@ class WebTest_Mailing_AddNewMailingComponentTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct.
-    $this->assertElementContainsText('crm-notification-container',  "The mailing component '$componentName' has been saved.");
+    $this->waitForText('crm-notification-container',  "The mailing component '$componentName' has been saved.");
 
     // Verify text.
     $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Footer']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
@@ -136,7 +136,7 @@ class WebTest_Mailing_AddNewMailingComponentTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct.
-    $this->assertElementContainsText('crm-notification-container',  "The mailing component '$componentName' has been saved.");
+    $this->waitForText('crm-notification-container',  "The mailing component '$componentName' has been saved.");
 
     // Verify text
     $this->assertTrue($this->isElementPresent("xpath=//table/tbody//tr/td[text()='{$componentName}']/../td[2][text()='Reply']/../td[3][text()='{$subject}']/../td[4][text()='{$txtMsg}']/../td[5][text()='{$htmlMsg}']"), "The row doesn't consists of proper component details");
index c3edaa3fa1ac769b1b7086615a14610585baed6c..8e15984fc7723c8cb7303e55cd0613584843aaad 100644 (file)
@@ -58,7 +58,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+    $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
 
     //---- create mailing contact and add to mailing Group
     $firstName = substr(sha1(rand()), 0, 7);
@@ -323,7 +323,7 @@ class WebTest_Mailing_MailingTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "The Group '$groupName' has been saved.");
+    $this->waitForText('crm-notification-container', "The Group '$groupName' has been saved.");
 
     //---- create mailing contact and add to mailing Group
     $firstName = substr(sha1(rand()), 0, 7);
index 33dc8ab485e2aa851549b7669ec0fcb76a503349..1bb3a2498905b2eb369ae394a90d75283365b097 100644 (file)
@@ -50,8 +50,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     // Add membership for this individual
     $this->_addMembership($memTypeParams);
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "membership for $firstName1 $lastName has been added.",
-      "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "membership for $firstName1 $lastName has been added");
 
     // click through to the membership view screen
     $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
@@ -75,8 +74,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     $this->_addMembership($memTypeParams);
     // Is status message correct?
 
-    $this->assertElementContainsText('crm-notification-container', "membership for $firstName2 $lastName has been added.",
-      "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "membership for $firstName2 $lastName has been added.");
 
     // click through to the membership view screen
     $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
@@ -196,7 +194,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     $this->click('_qf_Group_next-bottom');
 
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
-    $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.");
 
     $this->select('field_name[0]', "value=Membership");
     $this->select('field_name[1]', "label={$customDataParams[0]} :: {$customDataParams[1]}");
@@ -206,7 +204,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     // Clicking save and new
     $this->click('_qf_Field_next_new-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[0]}' has been saved to '{$profileTitle}'.");
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[0]}' has been saved to '{$profileTitle}'.");
 
     // Add membership status field to profile - CRM-8618
     $this->select('field_name[0]', "value=Membership");
@@ -216,7 +214,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     // Clicking save
     $this->click('_qf_Field_next-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Membership Status' has been saved to '{$profileTitle}'.");
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Membership Status' has been saved to '{$profileTitle}'.");
   }
 
   function _addCustomData() {
@@ -240,7 +238,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
 
     //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.");
 
     $textFieldLabel = 'Custom Field Text_' . substr(sha1(rand()), 0, 4);
     $this->type('label', $textFieldLabel);
@@ -259,7 +257,7 @@ class WebTest_Member_BatchUpdateViaProfileTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$textFieldLabel' has been saved.");
 
     return array($textFieldLabel, $customGroupTitle);
   }
index e8cebc0b4669ed1c75601529526315049d0eaa2a..c080dabce10cafb5b822a70ee5ade72aca2e2568 100644 (file)
@@ -56,7 +56,7 @@ class WebTest_Member_ContactContextAddTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "$firstName $lastName has been created.");
+    $this->waitForText('crm-notification-container', "$firstName $lastName");
 
     // click through to the membership view screen
     $this->click("css=li#tab_member a");
@@ -93,8 +93,7 @@ class WebTest_Member_ContactContextAddTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "membership for $firstName $lastName has been added.",
-      "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "membership for $firstName $lastName has been added.");
 
     // click through to the membership view screen
     $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
@@ -180,7 +179,7 @@ class WebTest_Member_ContactContextAddTest extends CiviSeleniumTestCase {
     // Clicking save.
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "$firstName $lastName has been created.");
+    $this->waitForText('crm-notification-container', "$firstName $lastName has been created.");
 
     // click through to the membership view screen
     $this->click("css=li#tab_member a");
@@ -218,8 +217,7 @@ class WebTest_Member_ContactContextAddTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "membership for $firstName $lastName has been added.",
-      "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "membership for $firstName $lastName has been added.");
 
     // click through to the membership view screen
     $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
index 497bf2b16ea2f4901e68e8b91808ba041090d435..91f7cb39a26651920b674cd033a47c7c8c4e9095 100644 (file)
@@ -41,7 +41,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->type('email_1_email', "$title@org.com");
     $this->click('_qf_Contact_upload_view');
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertElementContainsText('crm-notification-container', "Organization {$title} has been created.");
+    $this->waitForText('crm-notification-container', "Organization {$title} has been created.");
 
     $this->openCiviPage('admin/member/membershipType', 'reset=1&action=browse');
 
@@ -69,7 +69,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
 
     $this->click('_qf_MembershipType_upload-bottom');
     $this->waitForElementPresent('link=Add Membership Type');
-    $this->assertElementContainsText('crm-notification-container', "The membership type 'Membership Type $title' has been saved.");
+    $this->waitForText('crm-notification-container', "Membership Type $title");
 
     $this->openCiviPage('contact/add', 'reset=1&ct=Organization', '_qf_Contact_cancel');
 
@@ -104,8 +104,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "Membership Type $title membership for Organization $title1 has been added.",
-      "Status message didn't show up after saving!");
+    $this->waitForText('crm-notification-container', "Membership Type $title");
 
     // click through to the membership view screen
     $this->click("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]/span/a[text()='View']");
@@ -156,7 +155,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->click('quick-save');
     $this->waitForElementPresent('current-relationships');
     //check the status message
-    $this->assertElementContainsText('crm-notification-container', 'New relationship created.');
+    $this->waitForText('crm-notification-container', 'New relationship created');
 
     $this->waitForElementPresent("xpath=//div[@id='current-relationships']//div//table/tbody//tr/td[9]/span/a[text()='View']");
 
@@ -200,7 +199,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->click('_qf_Relationship_upload');
     $this->waitForElementPresent('inactive-relationships');
     //check the status message
-    $this->assertElementContainsText('crm-notification-container', 'Relationship record has been updated.');
+    $this->waitForText('crm-notification-container', 'Relationship record has been updated');
 
     // click through to the membership view screen
     $this->click('css=li#tab_member a');
@@ -223,7 +222,7 @@ class WebTest_Member_InheritedMembershipTest extends CiviSeleniumTestCase {
     $this->click('_qf_Relationship_upload');
     $this->waitForElementPresent('current-relationships');
     //check the status message
-    $this->assertElementContainsText('crm-notification-container', 'Relationship record has been updated.');
+    $this->waitForText('crm-notification-container', 'Relationship record has been updated.');
 
     //check for memberships
     $this->click('css=li#tab_member a');
index 68d6dc11bf581daa298b9e1d58ab91b5228852a0..4a28ad2c5b1bf3829708ea656833e18cdc0bc8b1 100644 (file)
@@ -143,7 +143,7 @@ class WebTest_Member_OfflineMembershipAddPricesetTest extends CiviSeleniumTestCa
     $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);
@@ -186,7 +186,7 @@ class WebTest_Member_OfflineMembershipAddPricesetTest extends CiviSeleniumTestCa
 
     $this->click('_qf_Set_next-bottom');
     $this->waitForElementPresent('_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) {
@@ -246,7 +246,7 @@ class WebTest_Member_OfflineMembershipAddPricesetTest extends CiviSeleniumTestCa
       $this->select("financial_type_id", "label={$contributionType}");
       $this->click('_qf_Field_next_new-bottom');
       $this->waitForPageToLoad($this->getTimeoutMsec());
-      $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);
   }
index 215339d8b776fc98fdf95da0e265d77997695b64..b38da54b4f74bdbd97de0ada623a6de999e0b387 100644 (file)
@@ -78,9 +78,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
 
     $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
 
@@ -185,9 +183,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
 
     $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
 
@@ -275,9 +271,7 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
 
     $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[7]/span[2][text()='more']/ul/li/a[text()='Renew']");
 
@@ -387,12 +381,8 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     $this->waitForTextPresent($sourceText);
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.",
-      "Status message didn't show up after saving!"
-    );
-    $this->assertElementContainsText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com.",
-      "Email sent to member message didn't show up after saving membership!"
-    );
+    $this->waitForText('crm-notification-container', "{$membershipTypes['membership_type']} membership for $firstName Memberson has been added.");
+    $this->waitForText('crm-notification-container', "A membership confirmation and receipt has been sent to {$firstName}@memberson.com.");
 
     $this->waitForElementPresent("xpath=//div[@id='Memberships']//table/tbody/tr/td[9]/span[2][text()='more']/ul/li/a[text()='Renew']");
 
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);
   }
index 04033dfdb95987cb8fca3c796bd1ff82292cc6dd..708aea32e67dd5400e20dbf50706a4daac93ebe4 100644 (file)
@@ -104,7 +104,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase {
     $this->click("membership_type_$memTypeId2");
     $this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom');
     $text = "'MembershipBlock' information has been saved.";
-    $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
+    $this->waitForText('crm-notification-container', $text);
 
     //logout
     $this->webtestLogout();
index c50d944bd3afa2b3058f68259a9082bdd2c31f90..3960a2d76f4833b42bdce678b0e46f2378bd6114 100644 (file)
@@ -41,7 +41,7 @@ class WebTest_Member_SeperateMembershipPaymentTest extends CiviSeleniumTestCase
     $firstName1 = 'Ma_' . substr(sha1(rand()), 0, 7);
     $lastName1 = 'An_' . substr(sha1(rand()), 0, 7);
     $this->webtestAddContact($firstName1, $lastName1, TRUE);
-    $this->assertElementContainsText('crm-notification-container', "$firstName1 $lastName1 has been created.");
+    $this->waitForText('crm-notification-container', "$firstName1 $lastName1 has been created.");
     $url = explode('&cid=', $this->getLocation());
     $cid = $url[1];
 
@@ -103,7 +103,7 @@ class WebTest_Member_SeperateMembershipPaymentTest extends CiviSeleniumTestCase
     $this->click("membership_type_$memTypeId2");
     $this->clickLink('_qf_MembershipBlock_next', '_qf_MembershipBlock_next-bottom');
     $text = "'MembershipBlock' information has been saved.";
-    $this->assertElementContainsText('crm-notification-container', $text, 'Missing text: ' . $text);
+    $this->waitForText('crm-notification-container', $text);
     $this->_testOnlineMembershipSignup($pageId, $memTypeTitle1, $cid);
 
     //Find Member
index 48fa5ca90d11327dc35771a1aa85a5b275233301..ff50a9723a6944c1431b6ac230d8cbc33fe1bc96 100644 (file)
@@ -63,9 +63,7 @@ class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Is status message correct?
-    $this->assertElementContainsText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.",
-      "Status message didn't show up after saving!"
-    );
+    $this->waitForText('crm-notification-container', "{$memTypeParams['membership_type']} membership for $firstName Anderson has been added.");
 
     // click through to the membership view screen
     $this->waitForElementPresent("xpath=//div[@id='memberships']//table//tbody/tr[1]/td[9]");
@@ -123,7 +121,7 @@ class WebTest_Member_UpdateMembershipScriptTest extends CiviSeleniumTestCase {
     // Clicking save
     $this->click('_qf_MembershipType_upload-bottom');
     $this->waitForElementPresent('link=Add Membership Type');
-    $this->assertElementContainsText('crm-notification-container', "The membership type '$title' has been saved.");
+    $this->waitForText('crm-notification-container', "The membership type '$title' has been saved.");
 
     return $memTypeParams;
   }
index 05cbb4663e8531a16e50fa959a2a9d3742b9be60..5fa74f4d5b905c83688fc023e8ff8bb566bd9a02 100644 (file)
@@ -91,7 +91,7 @@ class WebTest_Pledge_ContactContextAddTest extends CiviSeleniumTestCase {
     $this->click("_qf_Pledge_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span[1]/a[text()='View']");
     //click through to the Pledge view screen
index b422067387d6badd6686f248c943c9f3a50d9c1d..cce6a3fe00cfcdb17a5f600d81189940a91acc74 100644 (file)
@@ -98,7 +98,7 @@ class WebTest_Pledge_ContactContextPledgePaymentAddTest extends CiviSeleniumTest
     $this->click("_qf_Pledge_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
     //click through to the Pledge view screen
@@ -272,7 +272,7 @@ class WebTest_Pledge_ContactContextPledgePaymentAddTest extends CiviSeleniumTest
     $this->click("_qf_Pledge_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
     //click through to the Pledge view screen
@@ -430,7 +430,7 @@ class WebTest_Pledge_ContactContextPledgePaymentAddTest extends CiviSeleniumTest
     $this->click("_qf_Pledge_upload-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     //Add payments
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
index acb45eb0f1d81d9b7cafc0b0833f61bd0a3c1c5e..95f2a8aedaaaf61eb4512769f39f39b2ebc7b5d2 100644 (file)
@@ -50,7 +50,7 @@ class WebTest_Pledge_StandaloneAddDeleteTest extends CiviSeleniumTestCase {
     $this->click('_qf_Pledge_upload-bottom');
     $this->waitForPageToLoad("30000");
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     // verify if Pledge is created
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
@@ -80,7 +80,7 @@ class WebTest_Pledge_StandaloneAddDeleteTest extends CiviSeleniumTestCase {
     $this->click('_qf_Contribution_upload-bottom');
 
     $this->waitForPageToLoad("30000");
-    $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved.");
 
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
     $this->click("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[1]/span/a");
@@ -91,7 +91,7 @@ class WebTest_Pledge_StandaloneAddDeleteTest extends CiviSeleniumTestCase {
     $this->type('total_amount', '250.00');
     $this->click('_qf_Contribution_upload-bottom');
     $this->waitForPageToLoad("30000");
-    $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved.");
 
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
     $this->click("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[1]/span/a");
@@ -103,7 +103,7 @@ class WebTest_Pledge_StandaloneAddDeleteTest extends CiviSeleniumTestCase {
     $this->type('total_amount', '170.00');
     $this->click('_qf_Contribution_upload-bottom');
     $this->waitForPageToLoad("30000");
-    $this->assertElementContainsText('crm-notification-container', "The contribution record has been saved.");
+    $this->waitForText('crm-notification-container', "The contribution record has been saved.");
 
     // delete the contribution associated with the 2nd payment
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
index 7fd52c2d1deb566fcf33b8257a95eb84456a15c5..f592222ef8bfbc9aefd28f991f942987b70f4549 100644 (file)
@@ -73,7 +73,7 @@ class WebTest_Pledge_StandaloneAddTest extends CiviSeleniumTestCase {
     $this->click('_qf_Pledge_upload-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
-    $this->assertElementContainsText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
+    $this->waitForText('crm-notification-container', "Pledge has been recorded and the payment schedule has been created.");
 
     // verify if Pledge is created
     $this->waitForElementPresent("xpath=//div[@id='Pledges']//table//tbody/tr[1]/td[10]/span/a[text()='View']");
index e152e53a7e1b7916d25a2ccd4938a2b105008895..a39d7610e2b1233f75b380144b6f33799223dc84 100644 (file)
@@ -562,7 +562,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->click('_qf_Group_next-bottom');
 
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
-    $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.");
 
     foreach ($customDataArr as $key => $customDataParams) {
       $this->select('field_name[0]', "label={$profileFor}");
@@ -573,7 +573,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
       // Clicking save and new
       $this->click('_qf_Field_next_new-bottom');
       $this->waitForPageToLoad($this->getTimeoutMsec());
-      $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[1]}' has been saved to '{$profileTitle}'.");
+      $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field '{$customDataParams[1]}' has been saved to '{$profileTitle}'.");
     }
   }
 
@@ -602,7 +602,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
 
     //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.");
 
     //for checkbox 1
     $checkLabel1 = 'Custom Check One Text_' . substr(sha1(rand()), 0, 4);
@@ -631,7 +631,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkLabel1' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$checkLabel1' has been saved.");
     $returnArray[1] = array($customGroupTitle, $checkLabel1);
 
     // create another custom field - Integer Radio
@@ -662,7 +662,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$checkLabel2' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$checkLabel2' has been saved.");
     $returnArray[2] = array($customGroupTitle, $checkLabel2);
 
     // create another custom field - Integer Radio
@@ -691,7 +691,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$dateFieldLabel' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$dateFieldLabel' has been saved.");
     $returnArray[3] = array($customGroupTitle, $dateFieldLabel);
 
     // create another custom field - Integer Radio
@@ -710,7 +710,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$richTextField' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$richTextField' has been saved.");
     $returnArray[4] = array($customGroupTitle, $richTextField);
 
     // create another custom field - Integer Radio
@@ -773,7 +773,7 @@ class WebTest_Profile_BatchUpdateTest extends CiviSeleniumTestCase {
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     //Is custom field created
-    $this->assertElementContainsText('crm-notification-container', "Your custom field '$radioLabel2' has been saved.");
+    $this->waitForText('crm-notification-container', "Your custom field '$radioLabel2' has been saved.");
     $returnArray[6] = array($customGroupTitle, $radioLabel2);
 
     return $returnArray;
index aa1308d303fc1d7a6acf5ff533ceb402d16f9dda..982389a3b51ba0dd4be25e7c76feeccfbd186e2e 100644 (file)
@@ -57,7 +57,7 @@ class WebTest_Profile_DedupeTest extends CiviSeleniumTestCase {
     $this->click("_qf_Contact_upload_view");
     $this->waitForPageToLoad($this->getTimeoutMsec());
     $individualName = $this->getText("xpath=//div[@class='crm-summary-display_name']");
-    $this->assertElementContainsText('crm-notification-container', "$individualName has been created.");
+    $this->waitForText('crm-notification-container', "$individualName has been created.");
 
     // submit dupe using profile/create as anonymous
     $this->openCiviPage('profile/create', 'gid=4&reset=1', '_qf_Edit_next');
index c7e1de430e1ac9e23e1e5067a0b4d7edd534c022..0f9cc890990d222899fbd25df37cbcf859d447c0 100644 (file)
@@ -101,7 +101,7 @@ class WebTest_Profile_MultiRecordProfileAddTest 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 field to profile
     $this->waitForElementPresent('field_name[0]');
index c565b62b62eb95692e35a3219f78fcdf5af56666..a886b48f77bcdcab97069de905bb457cbf7040c9 100644 (file)
@@ -99,7 +99,7 @@ class WebTest_Profile_ProfileAddTest 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 field to profile
     $this->click('field_name[0]');
@@ -125,6 +125,6 @@ class WebTest_Profile_ProfileAddTest 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.");
   }
 }
index efd30276936af274afc51b456f836f93ecfefbab..e6020d0a44102d2aa5ec19b238af43999e349685 100644 (file)
@@ -68,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]');
@@ -133,7 +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.");
   }
 }
 
index 7c11c7dfc776d6f628a9cd1b445f0c70622af005..e22c19317399c508536d86ddcfff94d80ef36778 100644 (file)
@@ -50,7 +50,7 @@ class WebTest_Profile_SearchTest 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.");
 
     // Get profile id (gid) from URL
     $elements = $this->parseURL();
@@ -70,8 +70,8 @@ class WebTest_Profile_SearchTest extends CiviSeleniumTestCase {
     $this->click('_qf_Field_next_new-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
     //check for field add
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Last Name' has been saved to '$profileTitle'.");
-    $this->assertElementContainsText('crm-notification-container', 'You can add another profile field.');
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Last Name' has been saved to '$profileTitle'.");
+    $this->waitForText('crm-notification-container', 'You can add another profile field.');
 
     // Add Email field.
     $this->click('field_name[0]');
@@ -87,8 +87,8 @@ class WebTest_Profile_SearchTest extends CiviSeleniumTestCase {
     $this->click('_qf_Field_next_new-bottom');
     $this->waitForPageToLoad($this->getTimeoutMsec());
     //check for field add
-    $this->assertElementContainsText('crm-notification-container', "Your CiviCRM Profile Field 'Email' has been saved to '$profileTitle'.");
-    $this->assertElementContainsText('crm-notification-container', 'You can add another profile field.');
+    $this->waitForText('crm-notification-container', "Your CiviCRM Profile Field 'Email' has been saved to '$profileTitle'.");
+    $this->waitForText('crm-notification-container', 'You can add another profile field.');
 
     // Add Sample Custom Field.
     $this->click('field_name[0]');
@@ -153,7 +153,7 @@ class WebTest_Profile_SearchTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isElementPresent("visibility"), 'Visibility field not present when editing existing profile field.');
     $this->click("xpath=//tr[@id='profile_visibility']/td[1]/a");
     $this->waitForElementPresent("xpath=//div[@id='crm-notification-container']/div/div[2]/p[2]");
-    $this->assertElementContainsText('crm-notification-container', 'Is this field hidden from other users');
+    $this->waitForText('crm-notification-container', 'Is this field hidden from other users');
     $this->select('visibility', 'value=Public Pages and Listings');
   }
 }