Webtest Fix
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Mon, 15 Dec 2014 13:32:43 +0000 (19:02 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Mon, 15 Dec 2014 13:32:43 +0000 (19:02 +0530)
tests/phpunit/WebTest/Contribute/AddPricesetTest.php
tests/phpunit/WebTest/Event/AddPricesetTest.php
tests/phpunit/WebTest/Event/ParticipantSearchTest.php
tests/phpunit/WebTest/Member/OfflineMembershipRenewTest.php

index 12e8f0cbf6108bbdec1c46ecc32474d4ef3fb713..58d2c3e678c5c37f60875d6cb195509ed43c724a 100644 (file)
@@ -535,7 +535,7 @@ class WebTest_Contribute_AddPricesetTest extends CiviSeleniumTestCase {
     //Find Contribution
     $this->openCiviPage("contribute/search", "reset=1", 'contribution_date_low');
 
-    $this->type('sort_name', "$firstName $lastName");
+    $this->type('sort_name', "$lastName $firstName");
     $this->clickLink('_qf_Search_refresh', "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE);
     $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", '_qf_ContributionView_cancel-bottom', FALSE);
 
index 8a4afc860bdfe2888cb91b201195b364361dd2e9..5ad105a2b1ca3dbe39079489b55224b04d1d8637 100644 (file)
@@ -600,7 +600,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
     $this->type('source', 'Event StandaloneAddTest Webtest');
 
     // Select an event fee
-    $this->waitForElementPresent("xpath=//div[@id='priceset']/div[2]/div[2]");
+    $this->waitForElementPresent("xpath=//div[@id='priceset']/div[2]/div[2]/input");
     $this->type("xpath=//div[@id='priceset']/div[2]/div[2]/input", '5');
     $this->fireEvent("xpath=//div[@id='priceset']/div[2]/div[2]/input", 'blur');
     $this->waitForElementPresent("xpath=//div[@id='priceset']/div[3]/div[2]/div[1]/span/input");
@@ -726,6 +726,7 @@ class WebTest_Event_AddPricesetTest extends CiviSeleniumTestCase {
 
     //check the delete for price field
     $this->openCiviPage("admin/price/field", "reset=1&action=browse&sid={$sid}");
+    $this->waitForElementPresent("xpath=//table[@id='options']/tbody/tr/td[9]/span[2]");
     $this->click("xpath=//table[@id='options']/tbody/tr/td[9]/span[2]/ul/li[2]/a");
     //assert the message
     $this->waitForText('price_set_used_by',
index 324c6f8c15c163efdcdecc29ac65127d95a9a642..65cada1df5611f31f8152d6294b559dc582bc1b4 100644 (file)
@@ -104,6 +104,7 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
 
     // visit event search page
     $this->openCiviPage("event/search", "reset=1");
+    $this->waitForElementPresent('_qf_Search_refresh');
 
     $eventName = "Fall Fundraiser Dinner";
     $this->select2("event_id", $eventName);
@@ -158,7 +159,8 @@ class WebTest_Event_ParticipantSearchTest extends CiviSeleniumTestCase {
     $this->webtestFillDate('event_end_date_high', '+1 year');
 
 
-    $this->clickLink("_qf_Search_refresh", "search-status");
+    $this->click("_qf_Search_refresh");
+    $this->waitForElementPresent("search-status");
 
     $stringsToCheck = array(
       "Start Date - greater than or equal to",
index abc614f2d311afbb2c006a18b17520603de606cf..908e6ddd1539b9699a420c8e74850601d2a7424a 100644 (file)
@@ -97,10 +97,10 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     // page was loaded
     $this->waitForTextPresent($sourceText);
 
-    $this->waitForElementPresent("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
 
     // click through to the membership view screen
-    $this->click("xpath=//div[@id='memberships']//table/tbody/tr/td[9]/span/a[text()='View']");
+    $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
 
     $this->waitForElementPresent('_qf_MembershipView_cancel-bottom');
 
@@ -200,10 +200,10 @@ class WebTest_Member_OfflineMembershipRenewTest extends CiviSeleniumTestCase {
     // page was loaded
     $this->waitForTextPresent($sourceText);
 
-    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span[1]/a[1][text()='View']");
+    $this->waitForElementPresent("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
 
     // click through to the membership view screen
-    $this->click("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr/td[9]/span[1]/a[1][text()='View']");
+    $this->click("xpath=//div[@id='memberships']/div/table/tbody/tr/td[9]/span/a[1][text()='View']");
 
     $this->waitForElementPresent('_qf_MembershipView_cancel-bottom');