__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
@core @core_group
Feature: Test role visibility for the groups management page
In order to control access
As an admin
I need to control which roles can see each other
Background: Set up some groups
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist:
| username | firstname | lastname | email |
| learner1 | Learner | 1 | learner1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
| manager1 | Manager | 1 | manager1@example.com |
And the following "course enrolments" exist:
| user | course | role |
| learner1 | C1 | student |
| teacher1 | C1 | editingteacher |
| manager1 | C1 | manager |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| learner1 | G1 |
| teacher1 | G1 |
| manager1 | G1 |
Scenario: Check the default roles are visible
Given I log in as "manager1"
And I am on the "Course 1" "groups" page
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should not exist in the "#members" "css_element"
And "optgroup[label='Student']" "css_element" should exist in the "#members" "css_element"
And "optgroup[label='Teacher']" "css_element" should exist in the "#members" "css_element"
And "optgroup[label='Manager']" "css_element" should exist in the "#members" "css_element"
And I log out
Scenario: Do not allow managers to view any roles and check they are hidden
Given I log in as "teacher1"
And I am on the "Course 1" "groups" page
When I set the field "groups" to "Group 1 (3)"
And I press "Show members for group"
Then "optgroup[label='No roles']" "css_element" should exist in the "#members" "css_element"
And "optgroup[label='Student']" "css_element" should exist in the "#members" "css_element"
And "optgroup[label='Teacher']" "css_element" should exist in the "#members" "css_element"
And "optgroup[label='Manager']" "css_element" should not exist in the "#members" "css_element"
And I log out
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| auto_creation.feature | File | 8.52 KB | 0777 |
|
| backup_restore_groups.feature | File | 2.83 KB | 0777 |
|
| behat_groups.php | File | 3.66 KB | 0777 |
|
| bulk_messaging.feature | File | 2.45 KB | 0777 |
|
| create_groups.feature | File | 6.97 KB | 0777 |
|
| custom_fields.feature | File | 3 KB | 0777 |
|
| delete_groups.feature | File | 2.88 KB | 0777 |
|
| group_customfields.feature | File | 3.35 KB | 0777 |
|
| group_description_picture.feature | File | 5.84 KB | 0777 |
|
| groups_import.feature | File | 7.75 KB | 0777 |
|
| id_uniqueness.feature | File | 2.36 KB | 0777 |
|
| overview.feature | File | 9.26 KB | 0777 |
|
| private_groups.feature | File | 11.63 KB | 0777 |
|
| role_visibility.feature | File | 2.32 KB | 0777 |
|
| update_groups.feature | File | 7.15 KB | 0777 |
|