MDL-43738 behat: Updating steps definitions and deprecating methods
[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
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"
047a8800 24 When I click on "Edit settings" "link" in the "Administration" "block"
b4e94458
DM
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"
047a8800 36 And I click on "Edit settings" "link" in the "Administration" "block"
b4e94458
DM
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"