Merge pull request #71 from dpradeep/merge-20140930
[civicrm-core.git] / tests / phpunit / WebTest / Contact / UpdateProfileTest.php
index 1ff31e6ca7b0b5164551ce51d40e00f214a99f18..716273bb0542e79216b22ac9bac1edeec343d60b 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.                                    |
  |                                                                    |
  +--------------------------------------------------------------------+
 */
 
-
 require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Contact_UpdateProfileTest
+ */
 class WebTest_Contact_UpdateProfileTest extends CiviSeleniumTestCase {
 
   protected function setUp() {
@@ -41,6 +44,7 @@ class WebTest_Contact_UpdateProfileTest extends CiviSeleniumTestCase {
     $locationUrl = $this->getLocation();
     $editUrl = str_replace('/view?', '/edit?', $locationUrl);
     $this->open($editUrl);
+    $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Modify profile field values
     // contact details section
@@ -72,8 +76,6 @@ class WebTest_Contact_UpdateProfileTest extends CiviSeleniumTestCase {
     $this->assertTrue($this->isTextPresent($street), 'In line ' . __LINE__);
     $this->assertTrue($this->isTextPresent($city), 'In line ' . __LINE__);
     $this->assertTrue($this->isTextPresent($postalCode), 'In line ' . __LINE__);
-    $this->assertTrue($this->isElementPresent("//div[@id='profilewrap1']/div[@id='crm-container']/div[7]/div[2][contains(text(), 'AR')]"));
+    $this->assertTrue($this->isElementPresent("//div[@id='profilewrap1']/div[@id='crm-container']/div/div[7]/div[2][contains(text(), 'AR')]"));
   }
 }
-
-