MDL-38484 behat: New test
[moodle.git] / course / tests / behat / rename_roles.feature
CommitLineData
b4e94458
DM
1@core_course
2Feature: Rename roles within a course
3 In order to set course roles names according to their responsabilities
4 As a moodle teacher
5 I need to edit the course role names
6
7 @javascript
8 Scenario: Rename roles within a course
9 Given the following "users" exists:
10 | username | firstname | lastname | email |
11 | teacher1 | Teacher | 1 | teacher1@asd.com |
12 | teacher2 | Teacher | 2 | teacher2@asd.com |
13 | student1 | Student | 1 | student1@asd.com |
14 And the following "courses" exists:
15 | fullname | shortname | format |
16 | Course 1 | C1 | topics |
17 And the following "course enrolments" exists:
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"
24 When I follow "Edit settings"
25 And I fill the moodle form with:
26 | Your word for 'Non-editing teacher' | Tutor |
27 | Your word for 'Student' | Learner |
28 And I press "Save changes"
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"
36 And I follow "Edit settings"
37 And I fill the moodle form with:
38 | Your word for 'Non-editing teacher' | |
39 | Your word for 'Student' | |
40 And I press "Save changes"
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"