From f852aaf4b28a51f91b88e69501979f4302b5474a Mon Sep 17 00:00:00 2001 From: Web Access Date: Mon, 11 Jan 2016 14:06:05 +0530 Subject: [PATCH] Webtests Fixes --- tests/phpunit/WebTest/Event/AddEventTest.php | 3 ++- tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php | 2 +- tests/phpunit/WebTest/Report/AddTest.php | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/WebTest/Event/AddEventTest.php b/tests/phpunit/WebTest/Event/AddEventTest.php index f62bd407db..cccd06e740 100644 --- a/tests/phpunit/WebTest/Event/AddEventTest.php +++ b/tests/phpunit/WebTest/Event/AddEventTest.php @@ -358,7 +358,7 @@ class WebTest_Event_AddEventTest extends CiviSeleniumTestCase { // Using helper webtestFillDate function. $this->webtestFillDateTime("start_date", "+1 week"); $this->webtestFillDateTime("end_date", "+1 week 1 day 8 hours "); - + $this->waitForElementPresent('max_participants'); $this->type("max_participants", "50"); $this->click("is_map"); $this->click("is_public"); @@ -1036,6 +1036,7 @@ WHERE ceft.entity_id = %1 AND ceft.entity_table = 'civicrm_contribution'"; //Add event $this->openCiviPage("event/add", "reset=1&action=add"); + $this->waitForElementPresent("_qf_EventInfo_cancel-bottom"); $eventName = 'My Event - ' . substr(sha1(rand()), 0, 7); $eventDescription = "Here is a description for this conference."; $this->_testAddEventInfo($eventName, $eventDescription); diff --git a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php index 73f073ecd1..bbdc4b2331 100644 --- a/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php +++ b/tests/phpunit/WebTest/Member/OnlineMembershipCreateTest.php @@ -233,7 +233,7 @@ class WebTest_Member_OnlineMembershipCreateTest extends CiviSeleniumTestCase { } if ($payLater) { $this->waitForAjaxContent(); - $this->click("xpath=//label[text()='Pay later label {$hash}']"); + $this->click("xpath=//div[@class='payment_processor-section']/div[2]/label[text()='Pay later label {$hash}']"); } $this->type("email-5", $firstName . "@example.com"); $this->waitForElementPresent("first_name"); diff --git a/tests/phpunit/WebTest/Report/AddTest.php b/tests/phpunit/WebTest/Report/AddTest.php index d82898c4a3..7784047852 100644 --- a/tests/phpunit/WebTest/Report/AddTest.php +++ b/tests/phpunit/WebTest/Report/AddTest.php @@ -117,6 +117,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase { // We want navigation menu $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul//li/a[text()='Access']"); + $this->waitForAjaxContent(); $this->click("is_navigation"); // Navigation menu under Reports section @@ -188,6 +189,7 @@ class WebTest_Report_AddTest extends CiviSeleniumTestCase { // Is Navigation? $this->click("xpath=//div[@class='crm-report-criteria']/div[@id='mainTabContainer']/ul/li[6]/a"); + $this->waitForAjaxContent(); $this->assertEquals("on", $this->getValue("is_navigation")); // Is correct Navigation Parent? -- 2.25.1