Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_cohort @core_customfield @javascript
2
Feature: Add and use cohort custom fields
3
  In order to store an extra information about cohorts
4
  As an admin
5
  I need to create cohort customs fields and be able to populate them on cohort creation
6
 
7
  Background:
8
    Given the following "custom field categories" exist:
9
      | name              | component   | area   | itemid |
10
      | Category for test | core_cohort | cohort | 0      |
11
 
12
  Scenario: Create a new cohort custom field and use the field for a new cohort
13
    When I log in as "admin"
14
    And I navigate to "Users > Accounts > Cohort custom fields" in site administration
15
    And I click on "Add a new custom field" "link"
16
    And I click on "Short text" "link"
17
    And I set the following fields to these values:
18
      | Name       | Test field |
19
      | Short name | testfield  |
20
    And I click on "Save changes" "button" in the "Adding a new Short text" "dialogue"
21
    Then the following should exist in the "generaltable" table:
22
      | Custom field | Short name | Type       |
23
      | Test field   | testfield  | Short text |
24
    And I navigate to "Users > Accounts > Cohorts" in site administration
25
    And I follow "Add new cohort"
26
    Then I should see "Category for test"
27
    And I should see "Test field"
28
    And I set the following fields to these values:
29
      | Name        | My new cohort             |
30
      | Context     | System                    |
31
      | Cohort ID   | mynewcohort               |
32
      | Description | My new cohort description |
33
      | Test field  | Custom field text         |
34
    And I press "Save changes"
35
    Then the following should exist in the "generaltable" table:
36
      | Name          | Cohort ID   | Description               |
37
      | My new cohort | mynewcohort | My new cohort description |
38
    And I press "Edit" action in the "My new cohort" report row
39
    And the field "Test field" matches value "Custom field text"