From 877c886084abb06e2d8c772fdcd5ff3b582130fb Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 4 Sep 2016 22:38:56 +1000 Subject: [PATCH] Added behat test to add outage. Related to code developed in Issue #1 --- tests/behat/auth_outage_configuration.feature | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/behat/auth_outage_configuration.feature diff --git a/tests/behat/auth_outage_configuration.feature b/tests/behat/auth_outage_configuration.feature new file mode 100644 index 0000000..5022824 --- /dev/null +++ b/tests/behat/auth_outage_configuration.feature @@ -0,0 +1,35 @@ +@auth @auth_outage @javascript +Feature: Test outage plugin works as expected. + In order to check if this plugin works + As an admin + I need to go through all configuration to ensure they can be changed and are consistent. + + Background: + Given I log in as "admin" + +# Scenario: Check if I can navigate to the default settings. +# Given I navigate to "Defaults" node in "Site administration > Plugins > Authentication > Outage" +# Then I should see "Outage Defaults" + + Scenario: Check if I can add a new outage. + Given I navigate to "Manage" node in "Site administration > Plugins > Authentication > Outage" + And I should see "Outages List" + When I click on "Create Outage" "link" + And I set the following fields to these values: + | starttime[day] | 2 | + | starttime[month] | January | + | starttime[year] | 2016 | + | starttime[hour] | 22 | + | starttime[minute] | 00 | + | stoptime[day] | 2 | + | stoptime[month] | January | + | stoptime[year] | 2016 | + | stoptime[hour] | 23 | + | stoptime[minute] | 30 | + | warningduration[number] | 90 | + | warningduration[timeunit] | minutes | + | title | My New Outage | + | description[text] | This is a test outage. | + And I press "Save changes" + Then I should see "My New Outage" + And I should see "This is a test outage."