From 23c608b02a260a713157317388d8d307b0f75ef3 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Wed, 17 Sep 2014 18:13:13 +0530 Subject: [PATCH] AddCancelPaymentTest Fix --- tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php b/tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php index 798927b9c2..c9ac2db2d3 100644 --- a/tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php +++ b/tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php @@ -75,10 +75,9 @@ class WebTest_Pledge_AddCancelPaymentTest extends CiviSeleniumTestCase { ) ); //Edit and add the first payment for 300.00 - $this->clickLink('_qf_PledgeView_next-bottom', "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a", FALSE); - $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[1]/span/a"); + $this->click('_qf_PledgeView_next-bottom'); + sleep(1); $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[@class='selector row-highlight']//tbody/tr[1]/td[1]/span[2]/a"); $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody//tr//td/table/tbody/tr[2]/td[8]/a[text()='Record Payment']"); $this->click("xpath=//div[@class='view-content']//table//tbody//tr//td/table/tbody/tr[2]/td[8]/a"); $this->waitForElementPresent("xpath=//form[@id='Contribution']//div[2]/table/tbody/tr[3]/td[2]/a"); @@ -95,7 +94,6 @@ class WebTest_Pledge_AddCancelPaymentTest extends CiviSeleniumTestCase { $this->verifyText("xpath=//div[@class='view-content']//table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[7]","Completed"); $this->verifyText("xpath=//div[@class='view-content']//table/tbody/tr[2]/td[2]/table/tbody/tr[4]/td[7]","Completed"); - //Cancel the contribution made for amount of 300.00 $this->waitForElementPresent("xpath=//div[@class='view-content']//table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='View Payment']"); $this->click("xpath=//div[@class='view-content']//table/tbody/tr[2]/td[2]/table/tbody/tr[2]/td[8]/a"); @@ -108,6 +106,7 @@ class WebTest_Pledge_AddCancelPaymentTest extends CiviSeleniumTestCase { $this->click("_qf_ContributionView_cancel-bottom"); $this->waitForElementPresent("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[10]/span/a[text()='View']"); + sleep(1); $this->click("xpath=//div[@class='view-content']//table//tbody/tr[1]/td[1]/span/a"); $this->waitForElementPresent("xpath=//div[@class='view-content']//table/tbody/tr[2]/td[2]/table/tbody/tr[3]/td[7]"); -- 2.25.1