[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/admin/tool/uploaduser/tests/behat/ -> upload_users.feature (source)

   1  @tool @tool_uploaduser @_file_upload
   2  Feature: Upload users
   3    In order to add users to the system
   4    As an 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" exist:
  10        | fullname | shortname | category |
  11        | Maths | math102 | 0 |
  12      And the following "groups" exist:
  13        | name | course | idnumber |
  14        | Section 1 | math102 | S1 |
  15        | Section 3 | math102 | S3 |
  16      And I log in as "admin"
  17      And I navigate to "Upload users" node in "Site administration > Users > Accounts"
  18      When I upload "lib/tests/fixtures/upload_users.csv" file to "File" filemanager
  19      And I press "Upload users"
  20      Then I should see "Upload users preview"
  21      And I should see "Tom"
  22      And I should see "Jones"
  23      And I should see "verysecret"
  24      And I should see "jonest@example.com"
  25      And I should see "Reznor"
  26      And I should see "course1"
  27      And I should see "math102"
  28      And I should see "group1"
  29      And I should see "Section 1"
  30      And I press "Upload users"
  31      And I press "Continue"
  32      And I follow "Browse list of users"
  33      And I should see "Tom Jones"
  34      And I should see "Trent Reznor"
  35      And I should see "reznor@example.com"
  36      And I am on site homepage
  37      And I follow "Maths"
  38      And I expand "Users" node
  39      And I follow "Groups"
  40      And I set the field "groups" to "Section 1 (1)"
  41      And the "members" select box should contain "Tom Jones"
  42  
  43    @javascript
  44    Scenario: Upload users with custom profile fields
  45      # Create user profile field.
  46      Given I log in as "admin"
  47      And I navigate to "User profile fields" node in "Site administration > Users > Accounts"
  48      And I set the field "datatype" to "Text area"
  49      And I set the following fields to these values:
  50        | Short name | superfield  |
  51        | Name       | Super field |
  52      And I click on "Save changes" "button"
  53      # Upload users.
  54      When I navigate to "Upload users" node in "Site administration > Users > Accounts"
  55      And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager
  56      And I press "Upload users"
  57      And I press "Upload users"
  58      # Check that users were created and the superfield is filled.
  59      And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
  60      And I follow "Tom Jones"
  61      And I should see "Super field"
  62      And I should see "The big guy"
  63      And I log out


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