From 59843a579c944a56bac61e38c285290e037188d5 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 27 Sep 2014 21:40:47 -0400 Subject: [PATCH] Webtest cleanup --- tests/phpunit/CiviTest/CiviSeleniumTestCase.php | 5 ++--- tests/phpunit/WebTest/Activity/IcalTest.php | 4 ++-- tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php | 2 +- tests/phpunit/WebTest/Case/CaseDashboardTest.php | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php index cf0a2ae1cb..79767e4266 100644 --- a/tests/phpunit/CiviTest/CiviSeleniumTestCase.php +++ b/tests/phpunit/CiviTest/CiviSeleniumTestCase.php @@ -400,9 +400,8 @@ class CiviSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase { } } if ($added) { - $this->click("_qf_Component_next-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->waitForText('crm-notification-container', "Saved"); + $this->clickLink("_qf_Component_next-bottom"); + $this->checkCRMAlert("Saved"); } } diff --git a/tests/phpunit/WebTest/Activity/IcalTest.php b/tests/phpunit/WebTest/Activity/IcalTest.php index d942f936cc..34b9a4341c 100644 --- a/tests/phpunit/WebTest/Activity/IcalTest.php +++ b/tests/phpunit/WebTest/Activity/IcalTest.php @@ -44,7 +44,7 @@ class WebTest_Activity_IcalTest extends CiviSeleniumTestCase { function testStandaloneActivityAdd() { $this->webtestLogin(); - $this->openCivipage("admin/setting/preferences/display", "reset=1", "name=activity_assignee_notification_ics"); + $this->openCiviPage("admin/setting/preferences/display", "reset=1", "name=activity_assignee_notification_ics"); // Notify assignees should be checked by default, so we just need to click the ical setting which is off by default. $this->check("name=activity_assignee_notification_ics"); @@ -58,7 +58,7 @@ class WebTest_Activity_IcalTest extends CiviSeleniumTestCase { $firstName1 = substr(sha1(rand()), 0, 7); $this->webtestAddContact("$firstName1", "Anderson", $firstName1 . "@anderson.com"); - $this->openCivipage("activity", "reset=1&action=add&context=standalone", "_qf_Activity_upload"); + $this->openCiviPage("activity", "reset=1&action=add&context=standalone", "_qf_Activity_upload"); $this->select("activity_type_id", "value=1"); diff --git a/tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php b/tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php index 9fbe1585b2..aa797c9193 100644 --- a/tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php +++ b/tests/phpunit/WebTest/Campaign/CampaignDescriptionTest.php @@ -47,7 +47,7 @@ class WebTest_Campaign_CampaignDescriptionTest extends CiviSeleniumTestCase { $this->enableComponents(array('CiviCampaign')); //Creating a new Campaign - $this->openCivipage('campaign/add', 'reset=1', '_qf_Campaign_upload-bottom'); + $this->openCiviPage('campaign/add', 'reset=1', '_qf_Campaign_upload-bottom'); $campaignTitle = "Campaign $title"; $this->type("title", $campaignTitle); diff --git a/tests/phpunit/WebTest/Case/CaseDashboardTest.php b/tests/phpunit/WebTest/Case/CaseDashboardTest.php index a6cba882b8..ea8b90857a 100644 --- a/tests/phpunit/WebTest/Case/CaseDashboardTest.php +++ b/tests/phpunit/WebTest/Case/CaseDashboardTest.php @@ -104,7 +104,7 @@ class WebTest_Case_CaseDashboardTest extends CiviSeleniumTestCase { $this->waitForText('crm-notification-container', "Case opened successfully."); // Go back to dashboard - $this->openCivipage('case', 'reset=1', 'css=a.button'); + $this->openCiviPage('case', 'reset=1'); // Click on a drilldown cell and check if right radio is checked $this->clickLink("css=a.crm-case-summary-drilldown", "css=input.crm-form-submit"); -- 2.25.1