[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/user/tests/behat/ -> view_participants.feature (source)

   1  @core @core_user
   2  Feature: View course participants
   3    In order to know who is on a course
   4    As a teacher
   5    I need to be able to view the participants on a course
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username  | firstname | lastname | email                 |
  10        | teacher1  | Teacher   | 1        | teacher1@example.com  |
  11        | student1  | Student   | 1        | student1@example.com  |
  12        | student2  | Student   | 2        | student2@example.com  |
  13        | student3  | Student   | 3        | student3@example.com  |
  14        | student4  | Student   | 4        | student4@example.com  |
  15        | student5  | Student   | 5        | student5@example.com  |
  16        | student6  | Student   | 6        | student6@example.com  |
  17        | student7  | Student   | 7        | student7@example.com  |
  18        | student8  | Student   | 8        | student8@example.com  |
  19        | student9  | Student   | 9        | student9@example.com  |
  20        | student10 | Student   | 10       | student10@example.com |
  21        | student11 | Student   | 11       | student11@example.com |
  22        | student12 | Student   | 12       | student12@example.com |
  23        | student13 | Student   | 13       | student13@example.com |
  24        | student14 | Student   | 14       | student14@example.com |
  25        | student15 | Student   | 15       | student15@example.com |
  26        | student16 | Student   | 16       | student16@example.com |
  27        | student17 | Student   | 17       | student17@example.com |
  28        | student18 | Student   | 18       | student18@example.com |
  29        | student19 | Student   | 19       | student19@example.com |
  30        | student20 | Student   | 20       | student20@example.com |
  31      And the following "courses" exist:
  32        | fullname | shortname | format |
  33        | Course 1 | C1        | topics |
  34      And the following "course enrolments" exist:
  35        | user      | course | role           |
  36        | teacher1  | C1     | editingteacher |
  37        | student1  | C1     | student        |
  38        | student2  | C1     | student        |
  39        | student3  | C1     | student        |
  40        | student4  | C1     | student        |
  41        | student5  | C1     | student        |
  42        | student6  | C1     | student        |
  43        | student7  | C1     | student        |
  44        | student8  | C1     | student        |
  45        | student9  | C1     | student        |
  46        | student10 | C1     | student        |
  47        | student11 | C1     | student        |
  48        | student12 | C1     | student        |
  49        | student13 | C1     | student        |
  50        | student14 | C1     | student        |
  51        | student15 | C1     | student        |
  52        | student16 | C1     | student        |
  53        | student17 | C1     | student        |
  54        | student18 | C1     | student        |
  55        | student19 | C1     | student        |
  56  
  57    @javascript
  58    Scenario: Use select and deselect all buttons
  59      Given I log in as "teacher1"
  60      And I follow "Course 1"
  61      And I follow "Participants"
  62      When I press "Select all"
  63      Then the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1"
  64      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1"
  65      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "1"
  66      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "1"
  67      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "1"
  68      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "1"
  69      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "1"
  70      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "1"
  71      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "1"
  72      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "1"
  73      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "1"
  74      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "1"
  75      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "1"
  76      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "1"
  77      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "1"
  78      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "1"
  79      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "1"
  80      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "1"
  81      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "1"
  82      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "1"
  83  
  84      And I press "Deselect all"
  85      And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "0"
  86      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "0"
  87      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "0"
  88      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "0"
  89      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "0"
  90      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "0"
  91      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "0"
  92      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "0"
  93      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "0"
  94      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "0"
  95      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "0"
  96      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "0"
  97      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "0"
  98      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "0"
  99      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "0"
 100      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "0"
 101      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "0"
 102      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "0"
 103      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "0"
 104      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "0"
 105  
 106    @javascript
 107    Scenario: Use select all users on this page, select all n users and deselect all
 108      Given the following "course enrolments" exist:
 109        | user      | course | role    |
 110        | student20 | C1     | student |
 111      When I log in as "teacher1"
 112      And I follow "Course 1"
 113      And I follow "Participants"
 114      And I follow "Surname"
 115      And I press "Select all users on this page"
 116      Then I should not see "Student 9"
 117      And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1"
 118      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1"
 119      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "1"
 120      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "1"
 121      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "1"
 122      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "1"
 123      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "1"
 124      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "1"
 125      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "1"
 126      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "1"
 127      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "1"
 128      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "1"
 129      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "1"
 130      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "1"
 131      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "1"
 132      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "1"
 133      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "1"
 134      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "1"
 135      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "1"
 136      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "1"
 137  
 138      And I press "Deselect all"
 139      And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "0"
 140      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "0"
 141      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "0"
 142      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "0"
 143      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "0"
 144      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "0"
 145      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "0"
 146      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "0"
 147      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "0"
 148      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "0"
 149      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "0"
 150      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "0"
 151      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "0"
 152      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "0"
 153      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "0"
 154      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "0"
 155      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "0"
 156      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "0"
 157      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "0"
 158      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "0"
 159  
 160      And I press "Select all 21 users"
 161      And I should see "Student 9"
 162      And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "1"
 163      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "1"
 164      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "1"
 165      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "1"
 166      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "1"
 167      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "1"
 168      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "1"
 169      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "1"
 170      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "1"
 171      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "1"
 172      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "1"
 173      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "1"
 174      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "1"
 175      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "1"
 176      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "1"
 177      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "1"
 178      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "1"
 179      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "1"
 180      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "1"
 181      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "1"
 182      And the field with xpath "//tbody//tr[21]//input[@class='usercheckbox']" matches value "1"
 183  
 184      And I press "Deselect all"
 185      And the field with xpath "//tbody//tr[1]//input[@class='usercheckbox']" matches value "0"
 186      And the field with xpath "//tbody//tr[2]//input[@class='usercheckbox']" matches value "0"
 187      And the field with xpath "//tbody//tr[3]//input[@class='usercheckbox']" matches value "0"
 188      And the field with xpath "//tbody//tr[4]//input[@class='usercheckbox']" matches value "0"
 189      And the field with xpath "//tbody//tr[5]//input[@class='usercheckbox']" matches value "0"
 190      And the field with xpath "//tbody//tr[6]//input[@class='usercheckbox']" matches value "0"
 191      And the field with xpath "//tbody//tr[7]//input[@class='usercheckbox']" matches value "0"
 192      And the field with xpath "//tbody//tr[8]//input[@class='usercheckbox']" matches value "0"
 193      And the field with xpath "//tbody//tr[9]//input[@class='usercheckbox']" matches value "0"
 194      And the field with xpath "//tbody//tr[10]//input[@class='usercheckbox']" matches value "0"
 195      And the field with xpath "//tbody//tr[11]//input[@class='usercheckbox']" matches value "0"
 196      And the field with xpath "//tbody//tr[12]//input[@class='usercheckbox']" matches value "0"
 197      And the field with xpath "//tbody//tr[13]//input[@class='usercheckbox']" matches value "0"
 198      And the field with xpath "//tbody//tr[14]//input[@class='usercheckbox']" matches value "0"
 199      And the field with xpath "//tbody//tr[15]//input[@class='usercheckbox']" matches value "0"
 200      And the field with xpath "//tbody//tr[16]//input[@class='usercheckbox']" matches value "0"
 201      And the field with xpath "//tbody//tr[17]//input[@class='usercheckbox']" matches value "0"
 202      And the field with xpath "//tbody//tr[18]//input[@class='usercheckbox']" matches value "0"
 203      And the field with xpath "//tbody//tr[19]//input[@class='usercheckbox']" matches value "0"
 204      And the field with xpath "//tbody//tr[20]//input[@class='usercheckbox']" matches value "0"
 205      And the field with xpath "//tbody//tr[21]//input[@class='usercheckbox']" matches value "0"


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