Merge pull request #4207 from TeNNoX/bettertagoverview3
[civicrm-core.git] / tests / phpunit / WebTest / Pledge / ContactContextAddTest.php
index 22387dd102df5cf231f0ae85c1f696f9bfdc9487..559f5e34ff48655ac7a89671327e4e27b294368e 100644 (file)
@@ -37,6 +37,8 @@ class WebTest_Pledge_ContactContextAddTest extends CiviSeleniumTestCase {
 
   function testContactContextAddTest() {
     $this->webtestLogin();
+    // Disable pop-ups for this test. Running test w/ pop-ups causes a spurious failure. dgg
+    $this->enableDisablePopups(FALSE);
 
     // create unique name
     $name      = substr(sha1(rand()), 0, 7);
@@ -108,8 +110,12 @@ class WebTest_Pledge_ContactContextAddTest extends CiviSeleniumTestCase {
     }
 
     $this->clickLink("_qf_PledgeView_next-bottom", "xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span[1]/a[text()='View']", FALSE);
+
+    $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
     $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a");
-    $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody//tr//td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment (Check, Cash, EFT ...)']");
+    $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody//tr//td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
+    // Re-enable pop-ups to leave things in the same state
+    $this->enableDisablePopups(TRUE);
   }
 }