[ Index ]

PHP Cross Reference of Unnamed Project

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 | first@example.com |
  11        | user2 | Second | User | second@example.com |
  12        | user3 | Third | User | third@example.com |
  13        | user4 | Forth | User | forth@example.com |
  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    Scenario: Add a cohort
  25      When I follow "Cohorts"
  26      Then I should see "Test cohort name"
  27      And I should see "333"
  28      And I should see "Test cohort description"
  29      And I should see "Created manually"
  30  
  31    Scenario: Add users to a cohort selecting them from the system users list
  32      When I add "First User (first@example.com)" user to "333" cohort members
  33      And I add "Second User (second@example.com)" user to "333" cohort members
  34      Then I should see "2" in the "#cohorts" "css_element"
  35      And I follow "Assign"
  36      And the "Current users" select box should contain "First User (first@example.com)"
  37      And the "Current users" select box should contain "Second User (second@example.com)"
  38      And the "Current users" select box should not contain "Forth User (forth@example.com)"
  39  
  40    Scenario: Add users to a cohort using a bulk user action
  41      When I follow "Bulk user actions"
  42      And I set the field "Available" to "Third User"
  43      And I press "Add to selection"
  44      And I set the field "Available" to "Forth User"
  45      And I press "Add to selection"
  46      And I set the field "id_action" to "Add to cohort"
  47      And I press "Go"
  48      And I set the field "Cohort" to "Test cohort name [333]"
  49      And I press "Add to cohort"
  50      And I follow "Cohorts"
  51      Then I should see "2" in the "#cohorts" "css_element"
  52      And I follow "Assign"
  53      And the "Current users" select box should contain "Third User (third@example.com)"
  54      And the "Current users" select box should contain "Forth User (forth@example.com)"
  55      And the "Current users" select box should not contain "First User (first@example.com)"
  56  
  57    @javascript
  58    Scenario: Edit cohort name in-place
  59      When I follow "Cohorts"
  60      And I click on "Edit cohort name" "link" in the "Test cohort name" "table_row"
  61      And I set the field "New name for cohort Test cohort name" to "Students cohort"
  62      And I press key "13" in the field "New name for cohort Test cohort name"
  63      Then I should not see "Test cohort name"
  64      And I should see "Students cohort"
  65      And I follow "Cohorts"
  66      And I should see "Students cohort"


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