MDL-59726 behat: Fix Behat tests affected by the new participants filter
[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
f156e3dd
JP
33 And I open the autocomplete suggestions list
34 And I should see "Role: Tutor" in the ".form-autocomplete-suggestions" "css_element"
35 And I should see "Role: Learner" in the ".form-autocomplete-suggestions" "css_element"
36 And I should not see "Role: Student" in the ".form-autocomplete-suggestions" "css_element"
fdeeaff9 37 And I am on "Course 1" course homepage
9bad658a 38 And I navigate to "Edit settings" in current page administration
f083d614 39 And I set the following fields to these values:
b4e94458
DM
40 | Your word for 'Non-editing teacher' | |
41 | Your word for 'Student' | |
24d0d813 42 And I press "Save and display"
70b03eff 43 And I follow "Switch role to..." in the user menu
b4e94458 44 And I should see "Teacher"
8392a860
RT
45 And "Student" "button" should exist
46 And "Learner" "button" should not exist
e5287f9b 47 And I navigate to course participants
f156e3dd
JP
48 And I open the autocomplete suggestions list
49 And I should see "Role: Non-editing teacher" in the ".form-autocomplete-suggestions" "css_element"
50 And I should see "Role: Student" in the ".form-autocomplete-suggestions" "css_element"