forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-22043-master' of git://github.com/andrewnicols/moodle
- Loading branch information
Showing
2 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
mod/forum/tests/behat/forum_subscriptions_management.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@mod @mod_forum | ||
Feature: A teacher can control the subscription to a forum | ||
In order to change individual user's subscriptions | ||
As a course administrator | ||
I can change subscription setting for my users | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher | Teacher | Tom | teacher@example.com | | ||
| student1 | Student | 1 | student.1@example.com | | ||
| student2 | Student | 2 | student.2@example.com | | ||
And the following "courses" exist: | ||
| fullname | shortname | category | | ||
| Course 1 | C1 | 0 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher | C1 | editingteacher | | ||
| student1 | C1 | student | | ||
| student2 | C1 | student | | ||
And I log in as "teacher" | ||
And I follow "Course 1" | ||
And I turn editing mode on | ||
And I add a "Forum" to section "1" and I fill the form with: | ||
| Forum name | Test forum name | | ||
| Forum type | Standard forum for general use | | ||
| Description | Test forum description | | ||
| Subscription mode | Auto subscription | | ||
|
||
Scenario: A teacher can change toggle subscription editing on and off | ||
Given I follow "Test forum name" | ||
And I follow "Show/edit current subscribers" | ||
Then ".userselector" "css_element" should not exist | ||
And "Turn editing on" "button" should exist | ||
And I press "Turn editing on" | ||
And ".userselector" "css_element" should exist | ||
And "Turn editing off" "button" should exist | ||
And I press "Turn editing off" | ||
And ".userselector" "css_element" should not exist | ||
And "Turn editing on" "button" should exist | ||
And I press "Turn editing on" | ||
And ".userselector" "css_element" should exist | ||
And "Turn editing off" "button" should exist | ||
And I press "Turn editing off" | ||
And ".userselector" "css_element" should not exist | ||
And "Turn editing on" "button" should exist |