MDL-57001 usermenu: Add switch role to the bottom of the user menu
[moodle.git] / course / tests / behat / rename_roles.feature
CommitLineData
550d842e 1@core @core_course
b4e94458
DM
2Feature: Rename roles within a course
3 In order to set course roles names according to their responsabilities
5d7b6307 4 As a teacher
b4e94458
DM
5 I need to edit the course role names
6
7 @javascript
8 Scenario: Rename roles within a course
759b323e 9 Given the following "users" exist:
b4e94458 10 | username | firstname | lastname | email |
0fe86bbd
RT
11 | teacher1 | Teacher | 1 | teacher1@example.com |
12 | teacher2 | Teacher | 2 | teacher2@example.com |
13 | student1 | Student | 1 | student1@example.com |
759b323e 14 And the following "courses" exist:
b4e94458
DM
15 | fullname | shortname | format |
16 | Course 1 | C1 | topics |
759b323e 17 And the following "course enrolments" exist:
b4e94458
DM
18 | user | course | role |
19 | teacher1 | C1 | editingteacher |
20 | teacher2 | C1 | teacher |
21 | student1 | C1 | student |
22 And I log in as "teacher1"
23 And I follow "Course 1"
047a8800 24 When I click on "Edit settings" "link" in the "Administration" "block"
f083d614 25 And I set the following fields to these values:
b4e94458
DM
26 | Your word for 'Non-editing teacher' | Tutor |
27 | Your word for 'Student' | Learner |
24d0d813 28 And I press "Save and display"
b4e94458
DM
29 And I expand "Switch role to..." node
30 Then I should see "Tutor"
31 And I should see "Learner"
32 And I follow "Participants"
33 And the "roleid" select box should contain "Tutor"
34 And the "roleid" select box should contain "Learner"
35 And the "roleid" select box should not contain "Student"
047a8800 36 And I click on "Edit settings" "link" in the "Administration" "block"
f083d614 37 And I set the following fields to these values:
b4e94458
DM
38 | Your word for 'Non-editing teacher' | |
39 | Your word for 'Student' | |
24d0d813 40 And I press "Save and display"
b4e94458
DM
41 And I expand "Switch role to..." node
42 And I should see "Teacher"
43 And I should see "Student"
44 And I should not see "Learner"
45 And I follow "Participants"
46 And the "roleid" select box should contain "Non-editing teacher"
47 And the "roleid" select box should contain "Student"