Merge pull request #2975 from atif-shaikh/WebTextFix
[civicrm-core.git] / tests / phpunit / WebTest / Import / ImportCiviSeleniumTestCase.php
index db33d6073f506750711cc73da9b4e07699cd2391..0e2c0e3354506b91f5bf1f7215cf0175cc54f322 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.                                    |
  |                                                                    |
@@ -108,7 +108,7 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
     }
 
     // Submit form.
-    $this->click('_qf_UploadFile_upload');
+    $this->click('_qf_DataSource_upload');
     $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Select matching field for cvs data.
@@ -550,16 +550,14 @@ class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
       $this->typeKeys("css=input#sort_name_navigation", $searchName);
 
       // Wait for result list.
-      $this->waitForElementPresent("css=div.ac_results-inner li");
+      $this->waitForElementPresent("css=ul.ui-autocomplete li");
 
       // Visit contact summary page.
-      $this->click("css=div.ac_results-inner li");
+      $this->click("css=ul.ui-autocomplete li");
       $this->waitForPageToLoad($this->getTimeoutMsec());
 
       // Get contact id from url.
-      $matches = array();
-      preg_match('/cid=([0-9]+)/', $this->getLocation(), $matches);
-      $contactIds[] = $matches[1];
+      $contactIds[] = $this->urlArg('cid');
     }
 
     return $contactIds;