Commit 44f76111 authored by Robert Lyon's avatar Robert Lyon
Browse files

Tidying up some of the old behat tests



Try to avoid doing too many settings exist checks

Change-Id: I75453450ddfbeeb6decbd18f0c850c48adc1c033
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 1102ea40
......@@ -24,13 +24,4 @@ So people can have access to their Mahara
And I follow "Administration"
And I choose "Pending registrations" in "Institutions"
And I follow "Approve"
# Checking switch matches the default value
And the following fields match these values:
| Institution staff | 0 |
# Turning it to the opposite
And I set the following fields to these values:
| Institution staff | 1 |
# Checking it can turn back to the default setting
And I set the following fields to these values:
| Institution staff | 0 |
And I press "Approve"
And I press "Approve"
......@@ -8,12 +8,6 @@ Scenario: Turning switches on and off on the Add user page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I follow "Administration"
And I choose "Add user" in "Users"
# Checking the default settings are correct
And the following fields match these values:
| Site staff | 0 |
| Site administrator | 0 |
| Institution administrator | 0 |
# Flicking the switches to the opposite
And I set the following fields to these values:
| Site staff | 1 |
| Site administrator | 1 |
......
......@@ -8,15 +8,7 @@ Scenario: Turning swtitches on and off on Networking page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I follow "Administration"
And I choose "Networking" in "Configure site"
# Checking the default settings are set
And the following fields match these values:
| Enable networking | 0 |
| Auto-register all hosts | 0 |
And I set the following fields to these values:
| Enable networking | 1 |
| Auto-register all hosts | 1 |
# Checks that the swtiches can change back
And I set the following fields to these values:
| Enable networking | 0 |
| Auto-register all hosts | 0 |
And I press "Save changes"
......@@ -32,12 +32,6 @@ Scenario: Creating and deleting external links (Selenium 1426983)
#And I accept the confirm popup
And I should see "Item deleted"
And I press "Save changes"
# Checking the default settings are correct
And the following fields match these values:
| Terms and conditions | 0 |
| Privacy statement | 1 |
| About | 1 |
| Contact us | 1 |
# Flicking the switches to the opposite
And I enable the switch "Terms and conditions"
And I disable the following switches:
......
......@@ -8,9 +8,6 @@ So I can benefit from the use of group categories
Given I log in as "admin" with password "Kupuhipa1"
And I follow "Administration"
And I choose "Group categories" in "Groups (Administer groups)"
# Checking the default is correct
And the following fields match these values:
| Enable group categories | 0 |
# Flicking the switch to the opposite setting
And I set the following fields to these values:
| Enable group categories | 1 |
......
@javascript @core @core_administration
Feature: Changing the configuration on the plugin administation page
In order to change the settings on the plugin administration page page
As an admin
So I can benefit from the uses of the switches
Scenario: Turning the switches on and off on Internal Search (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I go to "admin/extensions/pluginconfig.php?plugintype=search&pluginname=internal"
# Verifing in on the right page
And I should see "Plugin administration: search: internal"
# Checking the default
And the following fields match these values:
| Exact user searches | 1 |
# Turning the switch on and off
And I set the following fields to these values:
| Exact user searches | 0 |
# Turning the switch back to default setting
And I set the following fields to these values:
| Exact user searches | 1 |
And I press "Save"
......@@ -10,46 +10,6 @@ Scenario: Turning the switches on and off on the Site Options page (Bug 1431569)
# Verifying I'm on the right page
And I should see "Here you can set some global options that will apply by default throughout the entire site."
And I expand all fieldsets
# Checking that the default settings are correct
And the following fields match these values:
| Drop-down navigation | 0 |
| Show homepage / dashboard information | 1 |
| Send weekly updates? | 0 |
| Users can choose page themes | 0 |
| Display remote avatars | 0 |
| Users can hide real names | 0 |
| Never display usernames | 0 |
| Show users in public search | 0 |
| Anonymous comments | 1 |
| Staff report access | 0 |
| Staff statistics access | 0 |
| Users can disable device detection | 0 |
| Require reason for masquerading | 0 |
| Notify users of masquerading | 0 |
| Show profile completion | 0 |
| Export to queue | 0 |
| Multiple journals | 0 |
| Allow group categories | 0 |
| Confirm registration | 0 |
| Users allowed multiple institutions | 1 |
| Auto-suspend expired institutions | 0 |
| Virus checking | 0 |
| Spamhaus URL blacklist | 0 |
| SURBL URL blacklist | 0 |
| Disable external resources in user HTML | 0 |
| reCAPTCHA on user registration form | 0 |
| Allow public pages | 1 |
| Allow public profiles | 1 |
| Allow anonymous pages | 0 |
| Sitemap | 1 |
| Portfolio search | 0 |
| Tag cloud | 1 |
| Maximum tags in cloud | 20 |
| Show online users | 1 |
| Registration agreement | 0 |
| License metadata | 0 |
| Custom licenses | 0 |
| Mobile uploads | 0 |
# Changing all the switches from their default settings
And I set the following fields to these values:
| Drop-down navigation | 1 |
......@@ -90,45 +50,5 @@ Scenario: Turning the switches on and off on the Site Options page (Bug 1431569)
| License metadata | 1 |
| Custom licenses | 1 |
| Mobile uploads | 1 |
# Setting the values back to their defaults
And I set the following fields to these values:
| Drop-down navigation | 0 |
| Show homepage / dashboard information | 1 |
| Send weekly updates? | 0 |
| Users can choose page themes | 0 |
| Display remote avatars | 0 |
| Users can hide real names | 0 |
| Never display usernames | 0 |
| Show users in public search | 0 |
| Anonymous comments | 1 |
| Staff report access | 0 |
| Staff statistics access | 0 |
| Users can disable device detection | 0 |
| Require reason for masquerading | 0 |
| Notify users of masquerading | 0 |
| Show profile completion | 0 |
| Export to queue | 0 |
| Multiple journals | 0 |
| Allow group categories | 0 |
| Confirm registration | 0 |
| Users allowed multiple institutions | 1 |
| Auto-suspend expired institutions | 0 |
| Virus checking | 0 |
| Spamhaus URL blacklist | 0 |
| SURBL URL blacklist | 0 |
| Disable external resources in user HTML | 0 |
| reCAPTCHA on user registration form | 0 |
| Allow public pages | 1 |
| Allow public profiles | 1 |
| Allow anonymous pages | 0 |
| Sitemap | 1 |
| Portfolio search | 0 |
| Tag cloud | 1 |
| Maximum tags in cloud | 20 |
| Show online users | 1 |
| Registration agreement | 0 |
| License metadata | 0 |
| Custom licenses | 0 |
| Mobile uploads | 0 |
And I press "Update site options"
......@@ -10,18 +10,6 @@ Scenario: Turning switchboxes on and off in diff areas (Bug 1431569)
# In the adding users area
When I choose "Add user" in "Users"
And I press "General account options"
# Cheking the default settings are correct first
And the following fields match these values:
| Friends control | |
| HTML editor | 1 |
| Disable email | 0 |
| Messages from other users | |
| Show controls to add and remove columns when editing a page | 0 |
| Multiple journals | 0 |
| Maximum tags in cloud | 20 |
| Maximum number of groups to display | |
| Sort groups | A to Z |
| Dashboard information | 1 |
# Changing the switches to their opposite setting
And I set the following fields to these values:
| HTML editor | 0 |
......@@ -40,15 +28,6 @@ Scenario: Turning switchboxes on and off in diff areas (Bug 1431569)
# In the Admin block adding users by CSV area
And I choose "Add users by CSV" in "Users"
And I follow "General account options"
And the following fields match these values:
| Friends control | |
| HTML editor | 1 |
| Disable email | 0 |
| Show controls to add and remove columns when editing a page | 0 |
| Multiple journals | 0 |
| Maximum tags in cloud | 20 |
| Maximum number of groups to display | |
| Dashboard information | 1 |
# Changing the switches to the opposite setting
And I set the following fields to these values:
| HTML editor | 0 |
......@@ -64,15 +43,7 @@ Scenario: Turning switchboxes on and off in diff areas (Bug 1431569)
And I follow "Logout"
Then I log in as "bob01" with password "Mahara1"
And I go to "account/index.php"
# And I wait "1" seconds
And I should not see "Undefined index:"
# Checking the default settings are correct
And the following fields match these values:
| HTML editor | 0 |
| Disable email | 1 |
# | Show controls to add and remove columns when editing a page | 1 |
| Multiple journals | 1 |
| Dashboard information | 0 |
# Changing the switches to their opposite setting
And I set the following fields to these values:
| HTML editor | 1 |
......
@javascript @core @core_administration
Feature: Switches on Uploads Groups via CSV Page
In order to turn switches on and off
As an admin
So I can change the settings on a page
Scenario: Turning the swtich on and off on the Upload Groups Via CSV page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I follow "Administration"
And I choose "Add groups by CSV" in "Groups (Administer groups)"
# Checking the default value is correct
And the following fields match these values:
| Update groups | 0 |
# Flicking the switch to the opposite of the default
And I set the following fields to these values:
| Update groups | 1 |
# Setting the switch back to the default setting
And I set the following fields to these values:
| Update groups | 0 |
And I press "Add groups by CSV"
......@@ -17,12 +17,6 @@ Scenario: Testing functions for user search page (Bug 1431569)
And I follow "P" in the "div#firstnamelist" "css_element"
And I follow "userA"
And I should see "Account settings | Pete Mc (userA)"
# Checking the default settings are right
And the following fields match these values:
| Force password change on next login | 0 |
| Site staff | 0 |
| Site administrator | 1 |
| Disable email | 0 |
# Flicking the switches to new settings
And I set the following fields to these values:
| Force password change on next login | 1 |
......
......@@ -18,18 +18,6 @@ Scenario: Turning on and of switches in Journal configuration block (Bug 1431569
# Navigating to switchbox in Journal block
And I choose "Journals" in "Content"
And I follow "New entry"
# Checking the default fields match
And the following fields match these values:
| Draft | 0 |
| Allow comments | 1 |
# Changing the switches once
And I set the following fields to these values:
| Draft | 1 |
| Allow comments | 0 |
# Changing the switches back
And I set the following fields to these values:
| Draft | 0 |
| Allow comments | 1 |
And I press "Save entry"
And I should see "There was an error with submitting this form. Please check the marked fields and try again."
......@@ -39,13 +27,6 @@ Scenario: Creating a Journal entry
# Navigating to switchbox in Journal block
And I choose "Journals" in "Content"
And I follow "New entry"
# Checking the default fields match
And the following fields match these values:
| Title * | |
| Entry * | |
| Draft | 0 |
| Allow comments | 1 |
# Changing the switches once and filling out a journal
And I set the following fields to these values:
| Title * | Story of my life |
| Allow comments | 0 |
......
......@@ -10,26 +10,6 @@ Scenario: Turning on and off switches on Group Edit page (Bug 1431569)
And I follow "Create group"
And I set the following fields to these values:
| Group name | The Avengers |
# Checking all the switches are set to their correct default
And the following fields match these values:
| Open | 1 |
| Controlled | 0 |
| Request | 0 |
| Friend invitations | 0 |
| Recommendations | 0 |
| Roles | Standard: Member, Admin |
| Create and edit | All group members |
| Allow submissions | 0 |
| Allow archiving of submissions | 0 |
| Publicly viewable group | 0 |
| Hide group | 0 |
| Hide membership | 0 |
| Hide membership from members | 0 |
| Participation report | 0 |
| Auto-add users | 0 |
| Shared page notifications | All group members |
| Comment notifications | All group members |
| Send forum posts immediately | 0 |
And I press "Save group"
And I follow "Edit \"The Avengers\" Settings"
# Checking all the switches can all be changed
......
......@@ -6,59 +6,11 @@ So I can have different settings for each institution
Scenario: Turning switches on and off on Edit Institution page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I go to "admin/users/institutions.php"
And I follow "Administration"
And I choose "Institutions" in "Institutions"
And I press "Add institution"
# Checking the default settings are correct
And the following fields match these values:
| Institution name * | |
| Registration allowed | 0 |
| Confirm registration | 1 |
| Drop-down navigation | 0 |
| Update user quotas | 0 |
| Allow institution public pages | 1 |
| Maximum user accounts allowed | |
# Turning the switches on and off
And I set the following fields to these values:
| Institution name * | Team Awesome |
| Registration allowed | 1 |
| Confirm registration | 0 |
| Drop-down navigation | 1 |
| Update user quotas | 1 |
| Allow institution public pages | 0 |
| Maximum user accounts allowed | |
# Setting the switches back to default settings
And I set the following fields to these values:
| Registration allowed | 0 |
| Confirm registration | 1 |
| Drop-down navigation | 0 |
| Update user quotas | 0 |
| Allow institution public pages | 1 |
| Maximum user accounts allowed | |
# Checking the default settings are correct
And the following fields match these values:
| First name | 0 |
| Last name | 0 |
| Student ID | 0 |
| Display name | 0 |
| Introduction | 0 |
| Email address | 0 |
| Official website address | 0 |
| Personal website address | 0 |
| Blog address | 0 |
| Postal address| 0 |
| Town | 0 |
| City/region | 0 |
| Country | 0 |
| Home phone | 0 |
| Business phone | 0 |
| Mobile phone | 0 |
| Fax number | 0 |
| Occupation | 0 |
| Industry | 0 |
| Email disabled | 0 |
| Social media | 0 |
# Turning the switches on and off
And I set the following fields to these values:
| First name | 1 |
| Last name | 1 |
| Student ID | 1 |
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment