Merge pull request #2763 from colemanw/master
[civicrm-core.git] / tests / phpunit / WebTest / Campaign / MembershipTest.php
index f209567819d46e8a4d8cc1c5dfaef3a3230fe57c..39f17f775d3ff49b1b8f6d3f16c416316cb1b59d 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'CiviTest/CiviSeleniumTestCase.php';
 class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
 
@@ -101,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]");
@@ -113,7 +110,7 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
   function memberAddTest($campaignTitle, $id) {
     //Add new memebershipType
     $memTypeParams = $this->webtestAddMembershipType();
-   
+
     // Adding Adding contact with randomized first name for test testContactContextActivityAdd
     // We're using Quick Add block on the main page for this.
     $firstName = substr(sha1(rand()), 0, 7);
@@ -143,7 +140,6 @@ class WebTest_Campaign_MembershipTest extends CiviSeleniumTestCase {
     $this->click("campaign_id");
     $this->select("campaign_id", "value=$id");
 
-
     // Let Join Date stay default
     // fill in Start Date
     $this->webtestFillDate('start_date');