[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_group 2 Feature: Automatic deletion of groups and groupings 3 In order to check the expected results occur when deleting 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 delete 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: Delete groups and groupings with and without ID numbers 44 Given I set the field "groups" to "Group (without ID) (0)" 45 And I press "Delete selected group" 46 And I press "Yes" 47 Then the "groups" select box should not contain "Group (without ID) (0)" 48 And I set the field "groups" to "Group (with ID) (0)" 49 And I press "Delete selected group" 50 And I press "Yes" 51 And the "groups" select box should not contain "Group (with ID) (0)" 52 And I follow "Groupings" 53 And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" 54 And I press "Yes" 55 And I should not see "Grouping (without ID)" 56 And I click on "Delete" "link" in the "Grouping (with ID)" "table_row" 57 And I press "Yes" 58 And I should not see "Grouping (with ID)" 59 60 @javascript 61 Scenario: Delete groups and groupings with and without ID numbers without the 'moodle/course:changeidnumber' capability 62 Given I log out 63 And I log in as "admin" 64 And I set the following system permissions of "Teacher" role: 65 | moodle/course:changeidnumber | Prevent | 66 And I log out 67 And I log in as "teacher1" 68 And I follow "Course 1" 69 And I expand "Users" node 70 And I follow "Groups" 71 When I set the field "groups" to "Group (with ID) (0)" 72 Then the "Delete selected group" "button" should be disabled 73 And I set the field "groups" to "Group (without ID) (0)" 74 And I press "Delete selected group" 75 And I press "Yes" 76 And I should not see "Group (without ID)" 77 And I follow "Groupings" 78 And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row" 79 And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" 80 And I press "Yes" 81 And I should not see "Grouping (without ID)"
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 |