[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/group/tests/behat/ -> overview.feature (source)

   1  @core @core_group
   2  Feature: Group overview
   3    In order to view an overview of the groups
   4    As a teacher
   5    I need to visit the group overview page
   6  
   7    Background:
   8      Given the following "courses" exist:
   9        | fullname | shortname | category | groupmode |
  10        | Course 1 | C1        | 0        | 1         |
  11      And the following "users" exist:
  12        | username | firstname | lastname | email                |
  13        | teacher1 | Teacher   | 1        | teacher1@example.com |
  14        | student0 | Student   | 0        | student0@example.com |
  15        | student1 | Student   | 1        | student1@example.com |
  16        | student2 | Student   | 2        | student2@example.com |
  17        | student3 | Student   | 3        | student3@example.com |
  18        | student4 | Student   | 4        | student4@example.com |
  19        | student5 | Student   | 5        | student5@example.com |
  20        | student6 | Student   | 6        | student6@example.com |
  21        | student7 | Student   | 7        | student7@example.com |
  22      And the following "course enrolments" exist:
  23        | user     | course | role           |
  24        | teacher1 | C1     | editingteacher |
  25        | student0 | C1     | student        |
  26        | student1 | C1     | student        |
  27        | student2 | C1     | student        |
  28        | student3 | C1     | student        |
  29        | student4 | C1     | student        |
  30        | student5 | C1     | student        |
  31        | student6 | C1     | student        |
  32        | student7 | C1     | student        |
  33      And the following "groups" exist:
  34        | name    | course | idnumber |
  35        | Group 1 | C1     | G1       |
  36        | Group 2 | C1     | G2       |
  37        | Group 3 | C1     | G3       |
  38        | Group 4 | C1     | G4       |
  39      And the following "group members" exist:
  40        | user     | group |
  41        | student0 | G1    |
  42        | student1 | G1    |
  43        | student2 | G2    |
  44        | student3 | G3    |
  45        | student4 | G3    |
  46        | student5 | G4    |
  47      And the following "groupings" exist:
  48        | name       | course | idnumber |
  49        | Grouping 1 | C1     | GG1      |
  50        | Grouping 2 | C1     | GG2      |
  51      And the following "grouping groups" exist:
  52        | grouping | group |
  53        | GG1      | G1    |
  54        | GG1      | G2    |
  55        | GG2      | G2    |
  56        | GG2      | G3    |
  57  
  58    Scenario: Filter the overview in various different ways
  59      Given I log in as "teacher1"
  60      And I follow "Course 1"
  61      And I navigate to "Groups" node in "Course administration > Users"
  62      And I follow "Overview"
  63  
  64      # Grouping All and Group All filter
  65      When I select "All" from the "Grouping" singleselect
  66      And I select "All" from the "group" singleselect
  67      # Following groups should exist in groupings.
  68      Then the group overview should include groups "Group 1, Group 2" in grouping "Grouping 1"
  69      And the group overview should include groups "Group 2,Group 3" in grouping "Grouping 2"
  70      And the group overview should include groups "Group 4" in grouping "[Not in a grouping]"
  71      And the group overview should include groups "No group" in grouping "[Not in a group]"
  72      # Following members should exit in group.
  73      And "Student 0" "text" should exist in the "Group 1" "table_row"
  74      And "Student 1" "text" should exist in the "Group 1" "table_row"
  75      And "Student 2" "text" should exist in the "Group 2" "table_row"
  76      And "Student 3" "text" should exist in the "Group 3" "table_row"
  77      And "Student 4" "text" should exist in the "Group 3" "table_row"
  78      And "Student 5" "text" should exist in the "Group 4" "table_row"
  79      And "Student 6" "text" should exist in the "No group" "table_row"
  80      And "Student 7" "text" should exist in the "No group" "table_row"
  81  
  82      # Grouping 1 and Group All filter
  83      And I select "Grouping 1" from the "Grouping" singleselect
  84      And I select "All" from the "group" singleselect
  85      # Following groups should exist in groupings.
  86      And the group overview should include groups "Group 1, Group 2" in grouping "Grouping 1"
  87      # Following groups should not exits
  88      And "Group 3" "table_row" should not exist
  89      And "No group" "table_row" should not exist
  90      # Following members should exit in group.
  91      And "Student 0" "text" should exist in the "Group 1" "table_row"
  92      And "Student 1" "text" should exist in the "Group 1" "table_row"
  93      And "Student 2" "text" should exist in the "Group 2" "table_row"
  94      # Following members should not exit in group.
  95      And I should not see "Student 3"
  96      And I should not see "Student 4"
  97      And I should not see "Student 5"
  98      And I should not see "Student 6"
  99      And I should not see "Student 7"
 100  
 101      # Grouping 2 and Group All filter
 102      And I select "Grouping 2" from the "Grouping" singleselect
 103      And I select "All" from the "group" singleselect
 104      # Following groups should exist in groupings.
 105      And the group overview should include groups "Group 2, Group 3" in grouping "Grouping 2"
 106      # Following groups should not exits
 107      And "Group 1" "table_row" should not exist
 108      And "No group" "table_row" should not exist
 109      # Following members should exit in group.
 110      And "Student 2" "text" should exist in the "Group 2" "table_row"
 111      And "Student 3" "text" should exist in the "Group 3" "table_row"
 112      And "Student 4" "text" should exist in the "Group 3" "table_row"
 113      # Following members should not exit in group.
 114      And I should not see "Student 0"
 115      And I should not see "Student 1"
 116      And I should not see "Student 5"
 117      And I should not see "Student 6"
 118      And I should not see "Student 7"
 119  
 120      # No grouping and Group All filter
 121      And I select "No grouping" from the "Grouping" singleselect
 122      And I select "All" from the "group" singleselect
 123      # Following groups should exist in groupings.
 124      And the group overview should include groups "Group 4" in grouping "[Not in a grouping]"
 125      And the group overview should include groups "No group" in grouping "[Not in a group]"
 126      # Following groups should not exits
 127      And "Group 1" "table_row" should not exist
 128      And "Group 2" "table_row" should not exist
 129      And "Group 3" "table_row" should not exist
 130      # Following members should exit in group.
 131      And "Student 5" "text" should exist in the "Group 4" "table_row"
 132      And "Student 6" "text" should exist in the "No group" "table_row"
 133      And "Student 7" "text" should exist in the "No group" "table_row"
 134      # Following members should not exit in group.
 135      And I should not see "Student 0"
 136      And I should not see "Student 1"
 137      And I should not see "Student 2"
 138      And I should not see "Student 3"
 139      And I should not see "Student 4"
 140  
 141      # Grouping All and Group 1 filter
 142      And I select "All" from the "Grouping" singleselect
 143      And I select "Group 1" from the "group" singleselect
 144      # Following groups should exist in groupings.
 145      And the group overview should include groups "Group 1" in grouping "Grouping 1"
 146      # Following groups should not exits
 147      And "Group 2" "table_row" should not exist
 148      And "Group 3" "table_row" should not exist
 149      And "Group 4" "table_row" should not exist
 150      And "No group" "table_row" should not exist
 151      # Following members should exit in group.
 152      And "Student 0" "text" should exist in the "Group 1" "table_row"
 153      And "Student 1" "text" should exist in the "Group 1" "table_row"
 154      # Following members should not exit in group.
 155      And I should not see "Student 2"
 156      And I should not see "Student 3"
 157      And I should not see "Student 4"
 158      And I should not see "Student 5"
 159      And I should not see "Student 6"
 160      And I should not see "Student 7"
 161  
 162      # Grouping All and Group 2 filter
 163      And I select "All" from the "Grouping" singleselect
 164      And I select "Group 2" from the "group" singleselect
 165      # Following groups should exist in groupings.
 166      And the group overview should include groups "Group 2" in grouping "Grouping 1"
 167      And the group overview should include groups "Group 2" in grouping "Grouping 2"
 168      # Following groups should not exits
 169      And "Group 1" "table_row" should not exist
 170      And "Group 3" "table_row" should not exist
 171      And "Group 4" "table_row" should not exist
 172      And "No group" "table_row" should not exist
 173      # Following members should exit in group.
 174      And "Student 2" "text" should exist in the "Group 2" "table_row"
 175      # Following members should not exit in group.
 176      And I should not see "Student 0"
 177      And I should not see "Student 1"
 178      And I should not see "Student 3"
 179      And I should not see "Student 4"
 180      And I should not see "Student 5"
 181      And I should not see "Student 6"
 182      And I should not see "Student 7"
 183  
 184      # Grouping All and No group filter
 185      And I select "All" from the "Grouping" singleselect
 186      And I select "No group" from the "group" singleselect
 187      # Following groups should exist in groupings.
 188      And the group overview should include groups "No group" in grouping "[Not in a group]"
 189      # Following groups should not exits
 190      And "Group 1" "table_row" should not exist
 191      And "Group 2" "table_row" should not exist
 192      And "Group 3" "table_row" should not exist
 193      And "Group 4" "table_row" should not exist
 194      # Following members should exit in group.
 195      And "Student 6" "text" should exist in the "No group" "table_row"
 196      And "Student 7" "text" should exist in the "No group" "table_row"
 197      # Following members should not exit in group.
 198      And I should not see "Student 0"
 199      And I should not see "Student 1"
 200      And I should not see "Student 2"
 201      And I should not see "Student 3"
 202      And I should not see "Student 4"
 203      And I should not see "Student 5"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1