Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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 @skip_chrome_zerosize
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 add "Cohort sync" enrolment method in "Course 1" with:
19
      | Cohort | Cohort 1 |
20
    And I should see "Cohort sync (Cohort 1 - Student)"
21
    And I add "Cohort sync" enrolment method in "Course 2" with:
22
      | Cohort | Cohort 2 |
23
    And I should see "Cohort sync (Cohort 2 - Student)"
24
    When I navigate to "Users > Accounts > Upload users" in site administration
25
    And I upload "lib/tests/fixtures/upload_users_cohorts.csv" file to "File" filemanager
26
    And I press "Upload users"
27
    And I press "Upload users"
28
    And I press "Continue"
29
    And I navigate to "Users > Accounts > Cohorts" in site administration
30
    And I press "Assign" action in the "Cohort 1" report row
31
    Then the "Current users" select box should contain "Tom Jones (tomjones@example.com)"
32
    And the "Current users" select box should contain "Bob Jones (bobjones@example.com)"
33
    And I press "Back to cohorts"
34
    And I press "Assign" action in the "Cohort 2" report row
35
    And the "Current users" select box should contain "Mary Smith (marysmith@example.com)"
36
    And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)"
37
    And I am on the "Course 1" "enrolled users" page
38
    And I should see "Tom Jones"
39
    And I should see "Bob Jones"
40
    And I should not see "Mary Smith"
41
    And I am on the "Course 2" "enrolled users" page
42
    And I should see "Mary Smith"
43
    And I should see "Alice Smith"
44
    And I should not see "Tom Jones"