1 @core @core_admin @_only_local
3 In order to add users to the system
5 I need to upload files containing the users data
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 collapse "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" filemanager
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"
42 And I expand "Users" node
44 And I select "Section 1 (1)" from "groups"
45 And the "members" select box should contain "Tom Jones"