Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-10-28-14-52-15
[civicrm-core.git] / tests / phpunit / WebTest / Import / ContactTest.php
index d38bfcc15c95c49132daffe1ec27c0e3e62a07b7..d8fb81dcead7a6b253c2c543a1d419a3d84d055e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'WebTest/Import/ImportCiviSeleniumTestCase.php';
 class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
 
-  protected $captureScreenshotOnFailure = TRUE;
-  protected $screenshotPath = '/var/www/api.dev.civicrm.org/public/sc';
-  protected $screenshotUrl = 'http://api.dev.civicrm.org/sc/';
-
   protected function setUp() {
     parent::setUp();
   }
@@ -79,8 +74,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
 
     // Visit contacts to check updated data.
     foreach ($updateRows as $updatedRow) {
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$updatedRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$updatedRow['contact_id']}");
 
       $displayName = "{$updatedRow['first_name']} {$updatedRow['last_name']}";
       $this->assertTrue($this->isTextPresent("$displayName"), "Contact did not update!");
@@ -111,8 +105,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
 
     // Visit contacts to check filled data.
     foreach ($fillRows as $cid => $fillRow) {
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$fillRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$fillRow['contact_id']}");
 
       // Check old display name.
       $displayName = "{$updateRows[$cid]['first_name']} {$updateRows[$cid]['last_name']}";
@@ -168,8 +161,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
     // Visit contacts to check updated data.
     foreach ($updateRows as $updatedRow) {
       $organizationName = $updatedRow['organization_name'];
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$updatedRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$updatedRow['contact_id']}");
 
       $this->assertTrue($this->isTextPresent("$organizationName"), "Contact did not update!");
     }
@@ -195,8 +187,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
 
     // Visit contacts to check filled data.
     foreach ($fillRows as $cid => $fillRow) {
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$fillRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$fillRow['contact_id']}");
 
       // Check old Organization name.
       $organizationName = $updateRows[$cid]['organization_name'];
@@ -251,8 +242,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
     // Visit contacts to check updated data.
     foreach ($updateRows as $updatedRow) {
       $householdName = $updatedRow['household_name'];
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$updatedRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$updatedRow['contact_id']}");
 
       $this->assertTrue($this->isTextPresent("$householdName"), "Contact did not update!");
     }
@@ -278,8 +268,7 @@ class WebTest_Import_ContactTest extends ImportCiviSeleniumTestCase {
 
     // Visit contacts to check filled data.
     foreach ($fillRows as $cid => $fillRow) {
-      $this->open($this->sboxPath . "civicrm/contact/view?reset=1&cid={$fillRow['contact_id']}");
-      $this->waitForPageToLoad($this->getTimeoutMsec());
+      $this->openCiviPage("contact/view", "reset=1&cid={$fillRow['contact_id']}");
 
       // Check old Household name.
       $householdName = $updateRows[$cid]['household_name'];