AddCancelPaymentTest Fix
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 17 Sep 2014 12:43:13 +0000 (18:13 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Wed, 17 Sep 2014 12:43:13 +0000 (18:13 +0530)
tests/phpunit/WebTest/Pledge/AddCancelPaymentTest.php

index 798927b9c200129633b79975f3a1d98bac771349..c9ac2db2d3c3dfd0475c8a7276c58c45dbf26269 100644 (file)
@@ -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]");