Change messages to wait instead of assert
[civicrm-core.git] / tests / phpunit / WebTest / Import / MatchExternalIdTest.php
index 2fbb6ccf50435c46c912b0bad23555f8155f9a22..3f0d105f4e49a18e246b50cd6cb7604c6fcdab94 100644 (file)
@@ -24,7 +24,6 @@
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
 class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
 
@@ -36,11 +35,6 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
      *  Test participant import for Individuals matching on external identifier.
      */
   function testContributionImport() {
-    // This is the path where our testing install resides.
-    // The rest of URL is defined in CiviSeleniumTestCase base class, in
-    // class attributes.
-    $this->open($this->sboxPath);
-
     $this->webtestLogin();
 
     // Get sample import data.
@@ -54,11 +48,6 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
      *  Test membership import for Individuals matching on external identifier.
      */
   function testMemberImportIndividual() {
-    // This is the path where our testing install resides.
-    // The rest of URL is defined in CiviSeleniumTestCase base class, in
-    // class attributes.
-    $this->open($this->sboxPath);
-
     $this->webtestLogin();
 
     // Get membership import data for Individuals.
@@ -72,11 +61,6 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
      *  Test participant import for Individuals matching on external identifier.
      */
   function testParticipantImportIndividual() {
-    // This is the path where our testing install resides.
-    // The rest of URL is defined in CiviSeleniumTestCase base class, in
-    // class attributes.
-    $this->open($this->sboxPath);
-
     // Log in using webtestLogin() method
     $this->webtestLogin();
 
@@ -260,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;
   }
@@ -296,7 +280,6 @@ class WebTest_Import_MatchExternalIdTest extends ImportCiviSeleniumTestCase {
 
     $this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
 
-    // Let's start filling the form with values.
     $this->select("event_type_id", "value={$params['event_type_id']}");
 
     // Attendee role s/b selected now.
@@ -352,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