Merge pull request #2687 from giant-rabbit/event_info_custom_validation
[civicrm-core.git] / tests / phpunit / WebTest / Import / ContactCustomDataTest.php
index 75b5259fdd9fe4e83f897b17e6b97f6adf1db74b..ee6f87fd1f3860dd8de1ae1454f27092cc556adf 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 'WebTest/Import/ImportCiviSeleniumTestCase.php';
 class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
 
@@ -103,7 +102,6 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent('This is a test field'));
   }
 
-
   /*
      *  Helper function to provide data for custom data import.
      */
@@ -149,9 +147,8 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
 
     //Is custom group created?
-    $this->assertTrue($this->isTextPresent("Your custom field set '{$customGroupTitle}' has been added. You can add custom fields now."));
-    $url = explode('gid=', $this->getLocation());
-    $gid = $url[1];
+    $this->waitForText('crm-notification-container', $customGroupTitle);
+    $gid = $this->urlArg('gid');
 
     // create another custom field - Date
     $customField = 'Custom field ' . substr(sha1(rand()), 0, 4);