From: Coleman Watts Date: Sat, 2 Mar 2013 01:23:37 +0000 (-0800) Subject: Make helper fn for enabling components X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=649c6141fb77c957d69cda01f29c3e2809700af0;p=civicrm-core.git Make helper fn for enabling components --- diff --git a/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php b/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php index 8f6e795a78..dbfc5fd4c7 100644 --- a/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php +++ b/tests/phpunit/WebTest/Campaign/SurveyUsageScenarioTest.php @@ -66,17 +66,7 @@ class WebTest_Campaign_SurveyUsageScenarioTest extends CiviSeleniumTestCase { $this->click("_qf_GroupContact_next"); $this->waitForPageToLoad($this->getTimeoutMsec()); - // Enable CiviCampaign module if necessary - $this->openCiviPage("admin/setting/component", "reset=1", "_qf_Component_next-bottom"); - $enabledComponents = $this->getSelectOptions("enableComponents-t"); - if (!in_array("CiviCampaign", $enabledComponents)) { - $this->addSelection("enableComponents-f", "label=CiviCampaign"); - $this->click("//option[@value='CiviCampaign']"); - $this->click("add"); - $this->click("_qf_Component_next-bottom"); - $this->waitForPageToLoad($this->getTimeoutMsec()); - $this->assertElementContainsText("crm-notification-container", "Saved"); - } + $this->enableComponents(array('CiviCampaign')); // add the required Drupal permission $permissions = array('edit-2-administer-civicampaign');