From c3d820915aad0f0da9588e622712d3434fbd2120 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Mon, 15 Sep 2014 20:11:25 -0400 Subject: [PATCH] CRM-15197 - Fix for WebTest_Contribute_UpdateContributionTest::testDeletePremium ---------------------------------------- * CRM-15197: https://issues.civicrm.org/jira/browse/CRM-15197 --- tests/phpunit/WebTest/Contribute/UpdateContributionTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php index 3a09d2d46e..5f4ee40f70 100755 --- a/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/UpdateContributionTest.php @@ -257,6 +257,12 @@ class WebTest_Contribute_UpdateContributionTest extends CiviSeleniumTestCase { // Clicking save. $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']", FALSE); + // Opening View page and cancelling to give the DB time to get updated prior to Assert statements below. dgg + $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']"); + $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); + $this->waitForElementPresent("_qf_ContributionView_cancel-bottom"); + $this->clickLink("_qf_ContributionView_cancel-bottom", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']", FALSE); + //Assertions $actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'"); $this->assertEquals($actualAmount, $cost, "Verify actual cost for deleted premium"); -- 2.25.1