From 504a5de3206b06af344f1ac5b000b064f6e43c8d Mon Sep 17 00:00:00 2001 From: Amaia Anabitarte Date: Wed, 23 Jan 2019 17:36:23 +0100 Subject: [PATCH] MDL-64663 core_message: Behat to test admin settings --- .../behat/message_admin_settings.feature | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 message/tests/behat/message_admin_settings.feature diff --git a/message/tests/behat/message_admin_settings.feature b/message/tests/behat/message_admin_settings.feature new file mode 100644 index 00000000000..e482454439e --- /dev/null +++ b/message/tests/behat/message_admin_settings.feature @@ -0,0 +1,30 @@ +@core @core_message @javascript +Feature: Message admin settings + In order to manage the messaging system + As an admin + I need to be able to enabled/disabled site-wide messaging system + + Background: + Given the following "users" exist: + | username | firstname | lastname | email | + | user1 | User | One | one@example.com | + + Scenario: enable site messaging + Given the following config values are set as admin: + | messaging | 1 | + When I log in as "admin" + Then "Toggle messaging drawer" "icon" should exist + And I navigate to "Users > Accounts > Browse list of users" in site administration + And I should see "User One" + And I follow "User One" + And "Add to contacts" "link" should exist + + Scenario: disable site messaging + Given the following config values are set as admin: + | messaging | 0 | + When I log in as "admin" + Then "Toggle messaging drawer" "icon" should not exist + And I navigate to "Users > Accounts > Browse list of users" in site administration + And I should see "User One" + And I follow "User One" + And "Add to contacts" "link" should not exist