From 0caa46792538fefbe028e700e90b83a6679b83ea Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 21 Mar 2013 17:43:29 -0700 Subject: [PATCH] A couple webtest fixes --- .../WebTest/Campaign/SurveyUsageScenarioTest.php | 10 +++++----- .../phpunit/WebTest/Generic/GeneralClickAroundTest.php | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php b/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php index cb90400d18..8015d746b1 100644 --- a/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php +++ b/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php @@ -45,7 +45,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { // add contact to group // visit group tab $this->click("css=li#tab_group a"); - $this->waitForElementPresent("group_id"); + $this->waitForElementPresent("css=#group_id option"); // add to group $this->select("group_id", "label=$groupName"); @@ -58,7 +58,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { // add contact to group // visit group tab $this->click("css=li#tab_group a"); - $this->waitForElementPresent("group_id"); + $this->waitForElementPresent("css=#group_id option"); // add to group $this->select("group_id", "label=$groupName"); @@ -250,7 +250,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { // add contact to group // visit group tab $this->click("css=li#tab_group a"); - $this->waitForElementPresent("group_id"); + $this->waitForElementPresent("css=#group_id option"); // add to group $this->select("group_id", "label=$groupName"); @@ -324,7 +324,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { // add contact to group // visit group tab $this->click("css=li#tab_group a"); - $this->waitForElementPresent('group_id'); + $this->waitForElementPresent('css=#group_id option'); // add to group $this->select("group_id", "label=$groupName"); @@ -338,7 +338,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { // add contact to group // visit group tab $this->click("css=li#tab_group a"); - $this->waitForElementPresent('group_id'); + $this->waitForElementPresent('css=#group_id option'); // add to group $this->select("group_id", "label=$groupName"); diff --git a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php index d214d8c72f..bc3aecdebc 100644 --- a/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php +++ b/tests/phpunit/WebTest/Generic/GeneralClickAroundTest.php @@ -33,7 +33,6 @@ class WebTest_Generic_GeneralClickAroundTest extends CiviSeleniumTestCase { function login() { $this->webtestLogin(); - $this->waitForPageToLoad($this->getTimeoutMsec()); $this->click("//a[contains(text(),'CiviCRM')]"); $this->waitForPageToLoad($this->getTimeoutMsec()); } @@ -99,7 +98,7 @@ class WebTest_Generic_GeneralClickAroundTest extends CiviSeleniumTestCase { $this->assertElementPresent("title"); $this->assertTextPresent("Access Control"); $this->waitForElementPresent('link=Settings'); - $this->assertTextPresent("Newsletter Subscribers"); + $this->assertTextPresent("Administrators"); $this->assertTextPresent("Add Group"); } -- 2.25.1