Commit 64ef4195 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge changes I732a3e76,I51fa5e28

* changes:
  Bug 1803478 Behat Subscribe - Unsubscribe forum topics
  Bug 1803473 Added scenario for Administrative forum bulk actions functionality
parents 145a5a88 36448a61
......@@ -4,40 +4,57 @@ Feature: Switching switch on and off when editing a forum
As an admin
I need to be able to flick the switch on and off
Background:
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | UserA@example.org | Angela | User | mahara | internal | member |
Scenario: Turning on and off switches in the group forums tab (Bug 1431569)
Given I log in as "admin" with password "Kupuh1pa!"
And I choose "My groups" in "Engage" from main menu
And I follow "Create group"
And I set the following fields to these values:
| Group name | Turtles |
When I press "Save group"
And I follow "Forums"
And I follow "General discussion"
And I follow "Edit forum"
# There are 2 settings links on the page and it needs to identify which one to follow
And I follow "Forum settings"
# Checking "Automatically subscribe users" switchbox is on by default
And the "edit_interaction_autosubscribe" checkbox should be checked
# Checking it can be turned off
And I disable the switch "Automatically subscribe users"
# Checking it can turn back on
And I enable the switch "Automatically subscribe users"
# Verifying that it did turn back on
And the "edit_interaction_autosubscribe" checkbox should be checked
# Checking off is the default setting on the close new topics checkbox
And the "edit_interaction_closetopics" checkbox should not be checked
# Checking it turns on
And I enable the switch "Close new topics"
# Checking it turns back off
And I disable the switch "Close new topics"
And I press "Save"
# And I add another forum
And I follow "Forums"
And I follow "New forum"
And I set the following fields to these values:
| Title | Freshwater turtles |
| Description | All about freshwater turtles |
And I follow "Forum settings"
# Checking "Automatically subscribe users" switchbox is on by default
And the "edit_interaction_autosubscribe" checkbox should be checked
And I press "Save"
Given I log in as "admin" with password "Kupuh1pa!"
And I choose "My groups" in "Engage" from main menu
And I follow "Create group"
And I set the following fields to these values:
| Group name | Turtles |
When I press "Save group"
And I follow "Forums"
And I follow "General discussion"
And I follow "Edit forum"
# There are 2 settings links on the page and it needs to identify which one to follow
And I follow "Forum settings"
# Checking "Automatically subscribe users" switchbox is on by default
And the "edit_interaction_autosubscribe" checkbox should be checked
# Checking it can be turned off
And I disable the switch "Automatically subscribe users"
# Checking it can turn back on
And I enable the switch "Automatically subscribe users"
# Verifying that it did turn back on
And the "edit_interaction_autosubscribe" checkbox should be checked
# Checking off is the default setting on the close new topics checkbox
And the "edit_interaction_closetopics" checkbox should not be checked
# Checking it turns on
And I enable the switch "Close new topics"
# Checking it turns back off
And I disable the switch "Close new topics"
And I press "Save"
# And I add another forum
And I follow "Forums"
And I follow "New forum"
And I set the following fields to these values:
| Title | Freshwater turtles |
| Description | All about freshwater turtles |
And I follow "Forum settings"
# Checking "Automatically subscribe users" switchbox is on by default
And the "edit_interaction_autosubscribe" checkbox should be checked
And I press "Save"
And I log out
# User joins group and unsubscribes from Freshwater turtles forum
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Find groups" in "Engage" from main menu
And I press "Join this group"
And I follow "Forums (tab)"
And I should see "Unsubscribe" in the "General discussion" row
And I should see "Unsubscribe" in the "Freshwater turtles" row
When I click on "Unsubscribe" in "Freshwater turtles" row
Then I should see "Forum unsubscribed successfully"
And I should see "Subscribe" in the "Freshwater turtles" row
......@@ -58,3 +58,55 @@ Scenario: Create forum and add block to group page
And I display the page
Then I should see "cat photography is often underrated"
And I should see "I just use my phone"
Scenario: Administrative forum bulk actions
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "My groups" in "Engage" from main menu
And I follow "Edit \"GroupA\" Settings"
And I follow "Forums (tab)"
And I follow "New forum"
And I set the following fields to these values:
| Title | Group A's forum |
| Description | Talking about things this group can do |
And I select "Fully expand" from "Forum indent mode"
And I enable the switch "Automatically subscribe users"
And I press "Save"
# Create 3 topics
And I follow "New topic"
And I set the following fields to these values:
| Subject | Taking photos of cats |
| Message | The difficulty of cat photography is often underrated. You need a fast lens to accurately capture the speed and agility of the cat. |
And I enable the switch "Send message now"
And I press "Post"
And I follow "Group A's forum"
# Second topic
And I follow "New topic"
And I set the following fields to these values:
| Subject | Taking photos of Dogs |
| Message | The difficulty of Dog photography is often underrated. You need a fast lens to accurately capture the speed and agility of the Dog. |
And I enable the switch "Send message now"
And I press "Post"
And I follow "Group A's forum"
# Third topic
And I follow "New topic"
And I set the following fields to these values:
| Subject | Taking photos of Cows |
| Message | The difficulty of Cows photography is often underrated. You need a fast lens to accurately capture the speed and agility of the Cows. |
And I enable the switch "Send message now"
And I press "Post"
And I follow "Group A's forum"
# Perform bulk actions of
And I check "Taking photos of Cows"
And I check "Taking photos of Dogs"
And I check "Taking photos of cats"
And I select "Close" from "action"
And I press "Update selected topics"
And I check "Taking photos of Cows"
And I check "Taking photos of Dogs"
And I check "Taking photos of cats"
And I select "Sticky" from "action"
When I press "Update selected topics"
And I follow "Taking photos of Cows"
And I follow "Edit topic"
And the "Closed" checkbox should be checked
And the "Sticky" checkbox should be checked
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