Fix for Webtest
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Wed, 17 Sep 2014 13:13:49 +0000 (18:43 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Wed, 17 Sep 2014 13:13:49 +0000 (18:43 +0530)
tests/phpunit/WebTest/Contribute/PCPAddTest.php
tests/phpunit/WebTest/Pledge/StandaloneAddTest.php

index 6250760836da6526f96fb852209232a0d7576c5e..a41648b6174780de7e6f261c7072aacc9066e653 100755 (executable)
@@ -181,11 +181,12 @@ class WebTest_Contribute_PCPAddTest extends CiviSeleniumTestCase {
 
     //Find Contribution
     $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
-
+    $this->waitForElementPresent('contribution_pcp_made_through_id');
     $this->select('contribution_pcp_made_through_id', "label={$pcpTitle}");
 
-    $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']");
-    $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom");
+    $this->clickLink("_qf_Search_refresh", "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1][text()='View']");
+    $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1][text()='View']");
+    $this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button[3]/span[2]");
 
     // View Contribution Record and test for expected values
     $expected = array(
index 1cc7adc45e232e4ac319b68b57d5e0034c4ed1ff..eec84b4d754ad6d46be5786e873bf0ef755d0967 100644 (file)
@@ -90,8 +90,8 @@ class WebTest_Pledge_StandaloneAddTest extends CiviSeleniumTestCase {
     $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");
+    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[2]/td[2]/table/tbody/tr[2]/td[8]/a[text()='Record Payment']");
   }
 }