[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

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

   1  @core @core_cohort
   2  Feature: Add cohorts of users
   3    In order to create site-wide groups
   4    As an admin
   5    I need to create cohorts and add users on them
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | user1 | First | User | [email protected] |
  11        | user2 | Second | User | [email protected] |
  12        | user3 | Third | User | [email protected] |
  13        | user4 | Forth | User | [email protected] |
  14      And I log in as "admin"
  15      And I navigate to "Cohorts" node in "Site administration > Users > Accounts"
  16      And I follow "Add new cohort"
  17      And I set the following fields to these values:
  18        | Name | Test cohort name |
  19        | Context | System |
  20        | Cohort ID | 333 |
  21        | Description | Test cohort description |
  22      And I press "Save changes"
  23  
  24    @javascript
  25    Scenario: Add a cohort
  26      When I follow "Cohorts"
  27      Then I should see "Test cohort name"
  28      And I should see "333"
  29      And I should see "Test cohort description"
  30      And I should see "Created manually"
  31  
  32    @javascript
  33    Scenario: Add users to a cohort selecting them from the system users list
  34      When I add "First User ([email protected])" user to "333" cohort members
  35      And I add "Second User ([email protected])" user to "333" cohort members
  36      Then I should see "2" in the "#cohorts" "css_element"
  37      And I follow "Assign"
  38      And the "Current users" select box should contain "First User ([email protected])"
  39      And the "Current users" select box should contain "Second User ([email protected])"
  40      And the "Current users" select box should not contain "Forth User ([email protected])"
  41  
  42    @javascript
  43    Scenario: Add users to a cohort using a bulk user action
  44      When I follow "Bulk user actions"
  45      And I set the field "Available" to "Third User"
  46      And I press "Add to selection"
  47      And I set the field "Available" to "Forth User"
  48      And I press "Add to selection"
  49      And I set the field "id_action" to "Add to cohort"
  50      And I press "Go"
  51      And I set the field "Cohort" to "Test cohort name [333]"
  52      And I press "Add to cohort"
  53      And I follow "Cohorts"
  54      Then I should see "2" in the "#cohorts" "css_element"
  55      And I follow "Assign"
  56      And the "Current users" select box should contain "Third User ([email protected])"
  57      And the "Current users" select box should contain "Forth User ([email protected])"
  58      And the "Current users" select box should not contain "First User ([email protected])"


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