MDL-46921 User: Add @core_user to new behat test.
[moodle.git] / user / tests / behat / table_sorting.feature
CommitLineData
2b187a47 1@core @core_user
28127d88
AG
2Feature: Tables can be sorted by additional names
3 In order to sort fields by additional names
4 As a user
5 I need to browse to a page with users in a table.
6
7 Background:
8 Given the following "users" exist:
9 | username | firstname | lastname | middlename | alternatename | email | idnumber |
10 | student1 | Annie | Edison | Faith | Anne | student1@mail.com | s1 |
11 | student2 | George | Bradley | David | gman | student2@mail.com | s2 |
12 | student3 | Travis | Sutcliff | Peter | Mr T | student3@mail.com | s3 |
13 And I log in as "admin"
14 And I navigate to "User policies" node in "Site administration > Users > Permissions"
15 And I set the following administration settings values:
16 | Full name format | firstname middlename lastname |
17 | Alternative full name format | firstname middlename alternatename lastname |
18
19 @javascript
20 Scenario: All user names are show and sortable in the administration user list.
21 Given I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
22 # And I should see "First name / Middle name / Alternate name / Surname"
23 Then the following should exist in the "users" table:
24 | First name / Middle name / Alternate name / Surname | Email address |
25 | Admin User | moodle@moodlemoodle.com |
26 | Annie Faith Anne Edison | student1@mail.com |
27 | George David gman Bradley | student2@mail.com |
28 | Travis Peter Mr T Sutcliff | student3@mail.com |
29 And "Admin User" "table_row" should appear before "Annie Faith Anne Edison" "table_row"
30 And "Annie Faith Anne Edison" "table_row" should appear before "George David gman Bradley" "table_row"
31 And "George David gman Bradley" "table_row" should appear before "Travis Peter Mr T Sutcliff" "table_row"
32 And I follow "Middle name"
33 And "George David gman Bradley" "table_row" should appear before "Annie Faith Anne Edison" "table_row"
34 And "Annie Faith Anne Edison" "table_row" should appear before "Travis Peter Mr T Sutcliff" "table_row"
35 And "Travis Peter Mr T Sutcliff" "table_row" should appear before "Admin User" "table_row"
36 And I follow "Middle name"
37 And "George David gman Bradley" "table_row" should appear after "Annie Faith Anne Edison" "table_row"
38 And "Annie Faith Anne Edison" "table_row" should appear after "Travis Peter Mr T Sutcliff" "table_row"
39 And "Travis Peter Mr T Sutcliff" "table_row" should appear after "Admin User" "table_row"
40 And I follow "Alternate name"
41 And "Annie Faith Anne Edison" "table_row" should appear before "George David gman Bradley" "table_row"
42 And "George David gman Bradley" "table_row" should appear before "Travis Peter Mr T Sutcliff" "table_row"
43 And "Travis Peter Mr T Sutcliff" "table_row" should appear before "Admin User" "table_row"
44 And I follow "Alternate name"
45 And "Annie Faith Anne Edison" "table_row" should appear after "George David gman Bradley" "table_row"
46 And "George David gman Bradley" "table_row" should appear after "Travis Peter Mr T Sutcliff" "table_row"
47 And "Travis Peter Mr T Sutcliff" "table_row" should appear after "Admin User" "table_row"
48 And I follow "Surname"
49 And "George David gman Bradley" "table_row" should appear before "Annie Faith Anne Edison" "table_row"
50 And "Annie Faith Anne Edison" "table_row" should appear before "Travis Peter Mr T Sutcliff" "table_row"
51 And "Travis Peter Mr T Sutcliff" "table_row" should appear before "Admin User" "table_row"
52 And I follow "Surname"
53 And "George David gman Bradley" "table_row" should appear after "Annie Faith Anne Edison" "table_row"
54 And "Annie Faith Anne Edison" "table_row" should appear after "Travis Peter Mr T Sutcliff" "table_row"
55 And "Travis Peter Mr T Sutcliff" "table_row" should appear after "Admin User" "table_row"