MDL-38620 behat: New test
[moodle.git] / admin / tests / behat / upload_users.feature
CommitLineData
2904bf9d
DM
1@admin @_only_local
2Feature: Upload users
3 In order to add users to the system
4 As a moodle admin
5 I need to upload files containing the users data
6
7 @javascript
8 Scenario: Upload users enrolling them on courses and groups
9 Given the following "courses" exists:
10 | fullname | shortname | category |
11 | Maths | math102 | 0 |
12 And the following "groups" exists:
13 | name | course | idnumber |
14 | Section 1 | math102 | S1 |
15 | Section 3 | math102 | S3 |
16 And I log in as "admin"
17 And I expand "Front page settings" node
18 And I expand "Site administration" node
19 And I expand "Users" node
20 And I expand "Accounts" node
21 And I follow "Upload users"
22 When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filepicker
23 And I press "Upload users"
24 Then I should see "Upload users preview"
25 And I should see "Tom"
26 And I should see "Jones"
27 And I should see "verysecret"
28 And I should see "jonest@someplace.edu"
29 And I should see "Reznor"
30 And I should see "course1"
31 And I should see "math102"
32 And I should see "group1"
33 And I should see "Section 1"
34 And I press "Upload users"
35 And I press "Continue"
36 And I follow "Browse list of users"
37 And I should see "Tom Jones"
38 And I should see "Trent Reznor"
39 And I should see "reznor@someplace.edu"
40 And I am on homepage
41 And I follow "Maths"
42 And I expand "Users" node
43 And I follow "Groups"
44 And I select "Section 1 (1)" from "groups"
45 And I wait "4" seconds
46 And the "members" select box should contain "Tom Jones"