[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/cohort/tests/behat/ -> upload_cohort_users.feature (source)

   1  @core @core_cohort @_file_upload
   2  Feature: Upload users to a cohort
   3    In order to quickly fill site-wide groups with users
   4    As an admin
   5    I need to upload a file with users data containing cohort assigns
   6  
   7    @javascript
   8    Scenario: Upload users and assign them to a course with cohort enrolment method enabled
   9      Given the following "cohorts" exist:
  10        | name | idnumber |
  11        | Cohort 1 | ASD |
  12        | Cohort 2 | DSA |
  13      And the following "courses" exist:
  14        | fullname | shortname | category |
  15        | Course 1 | C1 | 0 |
  16        | Course 2 | C2 | 0 |
  17      And I log in as "admin"
  18      And I follow "Course 1"
  19      And I add "Cohort sync" enrolment method with:
  20        | Cohort | Cohort 1 |
  21      And I am on homepage
  22      And I follow "Course 2"
  23      And I add "Cohort sync" enrolment method with:
  24        | Cohort | Cohort 2 |
  25      When I navigate to "Upload users" node in "Site administration > Users > Accounts"
  26      And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager
  27      And I press "Upload users"
  28      And I press "Upload users"
  29      And I press "Continue"
  30      And I follow "Cohorts"
  31      And I click on "Assign" "link" in the "Cohort 1" "table_row"
  32      Then the "Current users" select box should contain "Tom Jones ([email protected])"
  33      And the "Current users" select box should contain "Bob Jones ([email protected])"
  34      And I press "Back to cohorts"
  35      And I click on "Assign" "link" in the "Cohort 2" "table_row"
  36      And the "Current users" select box should contain "Mary Smith ([email protected])"
  37      And the "Current users" select box should contain "Alice Smith ([email protected])"
  38      And I am on homepage
  39      And I follow "Course 1"
  40      And I expand "Users" node
  41      And I follow "Enrolled users"
  42      And I should see "Tom Jones"
  43      And I should see "Bob Jones"
  44      And I should not see "Mary Smith"
  45      And I am on homepage
  46      And I follow "Course 2"
  47      And I expand "Users" node
  48      And I follow "Enrolled users"
  49      And I should see "Mary Smith"
  50      And I should see "Alice Smith"
  51      And I should not see "Tom Jones"


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1