CRM-15603 - Standardize 'None found' messages
[civicrm-core.git] / tests / phpunit / WebTest / Campaign / OfflineEventRegistrationTest.php
index 59f256b45f306919afd1086dfa908b32e1c56502..f67d426525154cf99a1588d2e705a1ebf5abd412 100644 (file)
@@ -81,7 +81,7 @@ class WebTest_Campaign_OfflineEventRegistrationTest extends CiviSeleniumTestCase
 
     $this->openCiviPage("campaign", "reset=1", "link=Add Campaign");
 
-    if ($this->isTextPresent('No campaigns found.')) {
+    if ($this->isTextPresent('None found.')) {
       $this->openCiviPage("participant/add", "reset=1&action=add&context=standalone", "_qf_Participant_upload-bottom");
       $this->assertTrue($this->isTextPresent('There are currently no active Campaigns.'));
     }
@@ -135,8 +135,7 @@ class WebTest_Campaign_OfflineEventRegistrationTest extends CiviSeleniumTestCase
     $this->click("campaign_id");
     $this->select("campaign_id", "value=$id");
     $this->waitForElementPresent('_qf_EventInfo_upload_done-bottom');
-    $this->click("_qf_EventInfo_upload_done-bottom");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
+    $this->clickLink("_qf_EventInfo_upload_done-bottom");
 
     // Adding contact with randomized first name (so we can then select that contact when creating event registration)
     // We're using Quick Add block on the main page for this.
@@ -148,7 +147,7 @@ class WebTest_Campaign_OfflineEventRegistrationTest extends CiviSeleniumTestCase
     $this->openCiviPage("participant/add", "reset=1&action=add&context=standalone", "_qf_Participant_upload-bottom");
 
     // Type contact last name in contact auto-complete, wait for dropdown and click first result
-    $this->webtestFillAutocomplete($firstName, 'contact_id');
+    $this->webtestFillAutocomplete($firstName);
 
     // Select event. Based on label for now.
     $this->select2("event_id", $eventName);
@@ -210,7 +209,7 @@ class WebTest_Campaign_OfflineEventRegistrationTest extends CiviSeleniumTestCase
     $this->click("remove");
     $this->click("_qf_Component_next-bottom");
     $this->waitForPageToLoad($this->getTimeoutMsec());
-    $this->assertTrue($this->isTextPresent("Changes Saved."));
+    $this->assertTrue($this->isTextPresent("Changes Saved"));
 
     $this->openCiviPage("event/search", "reset=1", "_qf_Search_refresh");