[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @core @core_user
   2  Feature: Filter users by idnumber
   3    As a system administrator
   4    I need to be able to filter users by their ID number
   5    So that I can quickly find users based on an external key.
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email | idnumber |
  10        | teacher1 | Teacher  | 1 | teacher@example.com  | 0000002 |
  11        | student1 | Student1 | 1 | student1@example.com | 0000003 |
  12        | student2 | Student2 | 1 | student2@example.com | 2000000 |
  13        | student3 | Student3 | 1 | student3@example.com | 3000000 |
  14      And I log in as "admin"
  15      And I am on site homepage
  16      And I expand "Site administration" node
  17      # Front page settings also has a "Users" node.
  18      And I expand "Users" node
  19      And I expand "Users" node
  20      And I expand "Accounts" node
  21      When I follow "Browse list of users"
  22  
  23    @javascript
  24    Scenario: Filtering id numbers - with case "is empty"
  25      # We should see see admin on the user list, the following e-mail is admin's e-mail.
  26      Then I should see "moodle@example.com" in the "users" "table"
  27      And I should see "Teacher" in the "users" "table"
  28      And I should see "Student1" in the "users" "table"
  29      And I should see "Student2" in the "users" "table"
  30      And I should see "Student3" in the "users" "table"
  31      And I follow "Show more..."
  32      And I set the field "id_idnumber_op" to "is empty"
  33      When I press "Add filter"
  34      # We should see admin on the user list, the following e-mail is admin's e-mail.
  35      Then I should see "moodle@example.com" in the "users" "table"
  36      And I should not see "Teacher" in the "users" "table"
  37      And I should not see "Student1" in the "users" "table"
  38      And I should not see "Student2" in the "users" "table"
  39      And I should not see "Student3" in the "users" "table"
  40  
  41    @javascript
  42    Scenario Outline: Filtering id numbers - with all other cases
  43      # We should see see admin on the user list, the following e-mail is admin's e-mail.
  44      Then I should see "moodle@example.com" in the "users" "table"
  45      And I should see "Teacher" in the "users" "table"
  46      And I should see "Student1" in the "users" "table"
  47      And I should see "Student2" in the "users" "table"
  48      And I should see "Student3" in the "users" "table"
  49      And I follow "Show more..."
  50      And I set the field "id_idnumber_op" to "<Category>"
  51      And I set the field "idnumber" to "<Argument>"
  52      When I press "Add filter"
  53      Then I should <Admin's Visibility> "moodle@example.com" in the "users" "table"
  54      And I should <Teacher's Vis> "Teacher" in the "users" "table"
  55      And I should <S1's Vis> "Student1" in the "users" "table"
  56      And I should <S2's Vis> "Student2" in the "users" "table"
  57      And I should <S3's Vis> "Student3" in the "users" "table"
  58  
  59  Examples:
  60      | Category        | Argument | Admin's Visibility | Teacher's Vis | S1's Vis | S2's Vis | S3's Vis |
  61      | contains        | 0        | not see            | see           | see      | see      | see      |
  62      | doesn't contain | 2        | see                | not see       | see      | not see  | see      |
  63      | is equal to     | 2000000  | not see            | not see       | not see  | see      | not see  |
  64      | starts with     | 0        | not see            | see           | see      | not see  | not see  |
  65      | ends with       | 0        | not see            | not see       | not see  | see      | see      |


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