[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_group 2 Feature: Automatic updating of groups and groupings 3 In order to check the expected results occur when updating groups and groupings in different scenarios 4 As a teacher 5 I need to create groups and groupings under different scenarios and check that the expected result occurs when attempting to update them. 6 7 Background: 8 Given the following "courses" exist: 9 | fullname | shortname | format | 10 | Course 1 | C1 | topics | 11 And the following "users" exist: 12 | username | firstname | lastname | email | 13 | teacher1 | Teacher | 1 | teacher1@example.com | 14 And the following "course enrolments" exist: 15 | user | course | role | 16 | teacher1 | C1 | editingteacher | 17 And I log in as "teacher1" 18 And I follow "Course 1" 19 And I expand "Users" node 20 And I follow "Groups" 21 And I press "Create group" 22 And I set the following fields to these values: 23 | Group name | Group (without ID) | 24 And I press "Save changes" 25 And I press "Create group" 26 And I set the following fields to these values: 27 | Group name | Group (with ID) | 28 | Group ID number | An ID | 29 And I press "Save changes" 30 And I follow "Groupings" 31 And I press "Create grouping" 32 And I set the following fields to these values: 33 | Grouping name | Grouping (without ID) | 34 And I press "Save changes" 35 And I press "Create grouping" 36 And I set the following fields to these values: 37 | Grouping name | Grouping (with ID) | 38 | Grouping ID number | An ID | 39 And I press "Save changes" 40 And I follow "Groups" 41 42 @javascript 43 Scenario: Update groups and groupings with ID numbers 44 Given I set the field "groups" to "Group (with ID)" 45 And I press "Edit group settings" 46 And the field "idnumber" matches value "An ID" 47 And I set the following fields to these values: 48 | Group name | Group (with ID) (updated) | 49 | Group ID number | An ID (updated) | 50 When I press "Save changes" 51 Then I should see "Group (with ID) (updated)" 52 And I set the field "groups" to "Group (with ID) (updated)" 53 And I press "Edit group settings" 54 And the field "idnumber" matches value "An ID (updated)" 55 And I press "Save changes" 56 And I follow "Groupings" 57 And I click on "Edit" "link" in the "Grouping (with ID)" "table_row" 58 And the field "idnumber" matches value "An ID" 59 And I set the following fields to these values: 60 | Grouping name | Grouping (with ID) (updated) | 61 | Grouping ID number | An ID (updated) | 62 And I press "Save changes" 63 And I should see "Grouping (with ID) (updated)" 64 And I click on "Edit" "link" in the "Grouping (with ID) (updated)" "table_row" 65 And the field "idnumber" matches value "An ID (updated)" 66 67 @javascript 68 Scenario: Update groups and groupings with ID numbers without the 'moodle/course:changeidnumber' capability 69 Given I log out 70 And I log in as "admin" 71 And I set the following system permissions of "Teacher" role: 72 | moodle/course:changeidnumber | Prevent | 73 And I log out 74 And I log in as "teacher1" 75 And I follow "Course 1" 76 And I expand "Users" node 77 And I follow "Groups" 78 And I set the field "groups" to "Group (with ID)" 79 When I press "Edit group settings" 80 Then the "idnumber" "field" should be readonly 81 And the field "idnumber" matches value "An ID" 82 And I set the following fields to these values: 83 | Group name | Group (with ID) (updated) | 84 And I press "Save changes" 85 And I should see "Group (with ID) (updated)" 86 And I set the field "groups" to "Group (with ID) (updated)" 87 And I press "Edit group settings" 88 And the "idnumber" "field" should be readonly 89 And the field "idnumber" matches value "An ID" 90 And I press "Save changes" 91 And I follow "Groupings" 92 And I click on "Edit" "link" in the "Grouping (with ID)" "table_row" 93 And the "idnumber" "field" should be readonly 94 And the field "idnumber" matches value "An ID" 95 And I set the following fields to these values: 96 | Grouping name | Grouping (with ID) (updated) | 97 And I press "Save changes" 98 And I should see "Grouping (with ID) (updated)" 99 And I click on "Edit" "link" in the "Grouping (with ID) (updated)" "table_row" 100 And the "idnumber" "field" should be readonly 101 And the field "idnumber" matches value "An ID" 102 103 @javascript 104 Scenario: Update groups with enrolment key 105 Given the following "courses" exist: 106 | fullname | shortname | 107 | Course 2 | C2 | 108 And the following "course enrolments" exist: 109 | user | course | role | 110 | teacher1 | C2 | editingteacher | 111 And I log out 112 And I log in as "teacher1" 113 And I follow "Course 1" 114 And I expand "Users" node 115 And I follow "Groups" 116 And I set the field "groups" to "Group (with ID)" 117 And I press "Edit group settings" 118 And I set the following fields to these values: 119 | Enrolment key | badpasswd | 120 When I press "Save changes" 121 Then I should see "Passwords must have at least 1 digit(s)" 122 And I set the following fields to these values: 123 | Enrolment key | Abcdef-1 | 124 And I press "Save changes" 125 And I set the field "groups" to "Group (with ID)" 126 And I press "Edit group settings" 127 And I press "Save changes" 128 And I should not see "This enrolment key is already used for another group." 129 And I set the field "groups" to "Group (without ID)" 130 And I press "Edit group settings" 131 And I set the following fields to these values: 132 | Enrolment key | Abcdef-1 | 133 And I press "Save changes" 134 And I should see "This enrolment key is already used for another group." 135 And I set the following fields to these values: 136 | Enrolment key | Abcdef-2 | 137 And I press "Save changes" 138 And I should not see "This enrolment key is already used for another group." 139 And I am on homepage 140 And I follow "Course 2" 141 And I expand "Users" node 142 And I follow "Groups" 143 And I press "Create group" 144 And I set the following fields to these values: 145 | Group name | Group A | 146 And I press "Save changes" 147 And I should not see "This enrolment key is already used for another group." 148 And I set the field "groups" to "Group A" 149 And I press "Edit group settings" 150 And I set the following fields to these values: 151 | Enrolment key | Abcdef-1 | 152 And I press "Save changes" 153 And I should not see "This enrolment key is already used for another group."
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |