Merge remote-tracking branch 'origin/abtest' into master-abtest
[civicrm-core.git] / tests / phpunit / WebTest / Import / ContactCustomDataTest.php
index 0010dd2dc5cd6421a9b77d2cc351362136fd5181..7f9c2e7e0d2184995326d2a1ae583ff9703e2bc9 100644 (file)
@@ -63,7 +63,6 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     // Add Contact
     $firstName2 = 'An_' . substr(sha1(rand()), 0, 7);
     $this->webtestAddContact($firstName2, "Summerson");
-    $this->waitForPageToLoad($this->getTimeoutMsec());
 
     // Edit and expand all tabs
     $this->click('link=Edit');
@@ -161,12 +160,10 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
     $this->click('extends[0]');
     $this->select('extends[0]', "value=Contact");
     $this->click("//option[@value='Contact']");
-    $this->click('_qf_Group_next-bottom');
-    $this->waitForElementPresent('newCustomField');
+    $this->clickLink('_qf_Group_next-bottom');
 
     //Is custom group created?
     $this->waitForText('crm-notification-container', $customGroupTitle);
-    $this->click('newCustomField');
     $this->waitForElementPresent('_qf_Field_cancel-bottom');
     $gid = $this->urlArg('gid');
 
@@ -185,7 +182,7 @@ class WebTest_Import_ContactCustomDataTest extends ImportCiviSeleniumTestCase {
 
     // clicking save
     $this->click('_qf_Field_done-bottom');
-    $this->waitForElementPresent('newCustomField');
+    $this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr/td");
 
     $this->waitForText('crm-notification-container', "Custom field '{$customField}' has been saved.");
     $customFieldId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField']/../../td[8]/span/a@href"));