weekly release 3.4dev
[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"
fdeeaff9 23 And I am on "Course 1" course homepage
9bad658a 24 When I navigate to "Edit settings" in current page administration
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"
70b03eff 29 And I follow "Switch role to..." in the user menu
8392a860
RT
30 Then "Tutor" "button" should exist
31 And "Learner" "button" should exist
e5287f9b 32 And I navigate to course participants
b4e94458
DM
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"
fdeeaff9 36 And I am on "Course 1" course homepage
9bad658a 37 And I navigate to "Edit settings" in current page administration
f083d614 38 And I set the following fields to these values:
b4e94458
DM
39 | Your word for 'Non-editing teacher' | |
40 | Your word for 'Student' | |
24d0d813 41 And I press "Save and display"
70b03eff 42 And I follow "Switch role to..." in the user menu
b4e94458 43 And I should see "Teacher"
8392a860
RT
44 And "Student" "button" should exist
45 And "Learner" "button" should not exist
e5287f9b 46 And I navigate to course participants
b4e94458
DM
47 And the "roleid" select box should contain "Non-editing teacher"
48 And the "roleid" select box should contain "Student"