From fa2228697d33af1475ae2bcd019c2ca6a0ead020 Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Mon, 17 Oct 2016 13:55:20 +1100 Subject: [PATCH] Behat will fail with Moodle 27, 28, 29 because the local/outage plugin is required for those versions. Removed those versions from behat tests. --- .travis.yml | 6 -- README.md | 11 ++++ tests/behat/manage_outages.feature | 98 +++++++++++++++--------------- 3 files changed, 60 insertions(+), 55 deletions(-) diff --git a/.travis.yml b/.travis.yml index c14a668..75ba988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,15 +15,9 @@ php: - 5.6 env: - - DB=pgsql MOODLE_BRANCH=MOODLE_27_STABLE - - DB=pgsql MOODLE_BRANCH=MOODLE_28_STABLE - - DB=pgsql MOODLE_BRANCH=MOODLE_29_STABLE - DB=pgsql MOODLE_BRANCH=MOODLE_30_STABLE - DB=pgsql MOODLE_BRANCH=MOODLE_31_STABLE - DB=pgsql MOODLE_BRANCH=master - - DB=mysqli MOODLE_BRANCH=MOODLE_27_STABLE - - DB=mysqli MOODLE_BRANCH=MOODLE_28_STABLE - - DB=mysqli MOODLE_BRANCH=MOODLE_29_STABLE - DB=mysqli MOODLE_BRANCH=MOODLE_30_STABLE - DB=mysqli MOODLE_BRANCH=MOODLE_31_STABLE - DB=mysqli MOODLE_BRANCH=master diff --git a/README.md b/README.md index ea04303..3f5cdc2 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ # Moodle Outage manager plugin * [What is this?](#what-is-this) +* [Moodle Requirements](#moodle-requirements) * [Screenshots](#screenshots) * [Installation](#installation) * [How to use](#how-to-use) @@ -24,6 +25,16 @@ an outage and after, different levels of warning and access can be provided to s and testers letting them know what is about to happen and why. +Moodle Requirements +------------------- + +This plugin will work out-of-the-box with Moodle 3+. + +If you have an older version of Moodle you can still make it work but you will +need to manually add one extra plugin, please check: +* https://github.com/catalyst/moodle-local_outage + + Screenshots ----------- diff --git a/tests/behat/manage_outages.feature b/tests/behat/manage_outages.feature index 7be7975..468cf99 100644 --- a/tests/behat/manage_outages.feature +++ b/tests/behat/manage_outages.feature @@ -1,4 +1,4 @@ -@dev @auth @auth_outage @javascript +@auth @auth_outage @javascript Feature: Manage outages In order to manage outages As an admin @@ -18,54 +18,54 @@ Feature: Manage outages And I wait "1" seconds -# Scenario: Check if I can navigate to management page. -# Given I am on homepage -# When I navigate to "Manage" node in "Site administration > Plugins > Authentication > Outage manager" -# Then I should see "Planned outages" -# And I should see "No outages found." in the "#section_planned_outages" "css_element" -# And I should see "Outage history" -# And I should see "No outages found." in the "#section_outage_history" "css_element" -# -# -# Scenario Outline: Planned outages should include all outages not finished or stopped. -# Given there is a "" outage -# When I am on Outage Management Page -# Then I should see "Example of outage" in the "#section_
" "css_element" -# -# Examples: -# | type | section | -# | waiting | planned_outages | -# | warning | planned_outages | -# | ongoing | planned_outages | -# | finished | outage_history | -# | stopped | outage_history | -# -# -# Scenario Outline: Planned and history outages have different actions. -# Given there is a "" outage -# When I am on Outage Management Page -# Then I should see "Example of outage" -# And I should the action "View" -# And I should the action "Clone" -# And I should the action "Edit" -# And I should the action "Delete" -# And I should the action "Finish" -# -# Examples: -# | type | view | clone | edit | delete | finish | -# | waiting | see | see | see | see | not see | -# | warning | see | see | see | see | not see | -# | ongoing | see | see | see | see | see | -# | finished | see | see | not see | not see | not see | -# | stopped | see | see | not see | not see | not see | -# -# -# Scenario: Create an outage using defaults. -# Given I am on Outage Management Page -# When I press "Create outage" -# And I press "Save changes" -# And I should not see "No outages found." in the "#section_planned_outages" "css_element" -# And I should see "No outages found." in the "#section_outage_history" "css_element" + Scenario: Check if I can navigate to management page. + Given I am on homepage + When I navigate to "Manage" node in "Site administration > Plugins > Authentication > Outage manager" + Then I should see "Planned outages" + And I should see "No outages found." in the "#section_planned_outages" "css_element" + And I should see "Outage history" + And I should see "No outages found." in the "#section_outage_history" "css_element" + + + Scenario Outline: Planned outages should include all outages not finished or stopped. + Given there is a "" outage + When I am on Outage Management Page + Then I should see "Example of outage" in the "#section_
" "css_element" + + Examples: + | type | section | + | waiting | planned_outages | + | warning | planned_outages | + | ongoing | planned_outages | + | finished | outage_history | + | stopped | outage_history | + + + Scenario Outline: Planned and history outages have different actions. + Given there is a "" outage + When I am on Outage Management Page + Then I should see "Example of outage" + And I should the action "View" + And I should the action "Clone" + And I should the action "Edit" + And I should the action "Delete" + And I should the action "Finish" + + Examples: + | type | view | clone | edit | delete | finish | + | waiting | see | see | see | see | not see | + | warning | see | see | see | see | not see | + | ongoing | see | see | see | see | see | + | finished | see | see | not see | not see | not see | + | stopped | see | see | not see | not see | not see | + + + Scenario: Create an outage using defaults. + Given I am on Outage Management Page + When I press "Create outage" + And I press "Save changes" + And I should not see "No outages found." in the "#section_planned_outages" "css_element" + And I should see "No outages found." in the "#section_outage_history" "css_element" Scenario: View an outage which should open in a new window or tab.