mirrored from git://git.moodle.org/moodle.git
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-23839-28' of git://github.com/andrewnicols/moodle i…
…nto MOODLE_28_STABLE
- Loading branch information
Showing
3 changed files
with
100 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@core @core_course | ||
Feature: Role assignments can be made at the category level | ||
In order to grant a user different capabilities | ||
As a user | ||
I can assign roles in categories | ||
|
||
Background: | ||
Given the following "users" exist: | ||
| username | firstname | lastname | | ||
| manager | Manager | Manager | | ||
And the following "categories" exist: | ||
| name | category | idnumber | | ||
| Cat 1 | 0 | CAT1 | | ||
And the following "role assigns" exist: | ||
| user | role | contextlevel | reference | | ||
| manager | manager | Category | CAT1 | | ||
And I log in as "admin" | ||
|
||
|
||
@javascript | ||
Scenario: A user with a category role can assign roles | ||
Given I define the allowed role assignments for the "Manager" role as: | ||
| Teacher | Assignable | | ||
And I log out | ||
And I log in as "manager" | ||
And I follow "Courses" | ||
When I follow "Cat 1" | ||
Then I should see "Assign roles" | ||
|
||
@javascript | ||
Scenario: A user with a category role cannot assign roles if there are no roles to assign | ||
Given I define the allowed role assignments for the "Manager" role as: | ||
| Manager | Not assignable | | ||
| Course creator | Not assignable | | ||
| Teacher | Not assignable | | ||
| Non-editing teacher | Not assignable | | ||
| Student | Not assignable | | ||
And I log out | ||
And I log in as "manager" | ||
And I follow "Courses" | ||
When I follow "Cat 1" | ||
Then I should not see "Assign roles" |
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
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