Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 63... Línea 63...
63
    And I should not see "Cohort in category 3"
63
    And I should not see "Cohort in category 3"
64
    And I log out
64
    And I log out
Línea 65... Línea 65...
65
 
65
 
66
  @javascript
66
  @javascript
-
 
67
  Scenario: Cohorts list can be filtered
-
 
68
    Given the following "custom field categories" exist:
-
 
69
      | name   | component   | area   | itemid |
-
 
70
      | Newcat | core_cohort | cohort | 0      |
-
 
71
    And the following "custom fields" exist:
-
 
72
      | name            | category | type     | shortname | description | configdata |
-
 
73
      | Field checkbox  | Newcat   | checkbox | checkbox  |             |            |
-
 
74
    And the following "cohorts" exist:
-
 
75
      | name           | idnumber | contextlevel | reference | customfield_checkbox |
67
  Scenario: Cohorts list can be filtered
76
      | Cohort with CF | CH4      | Category     | CAT1      | 1                    |
68
    When I log in as "admin"
77
    When I log in as "admin"
69
    And I navigate to "Users > Accounts > Cohorts" in site administration
78
    And I navigate to "Users > Accounts > Cohorts" in site administration
70
    And I follow "All cohorts"
79
    And I follow "All cohorts"
71
    And I click on "Filters" "button"
80
    And I click on "Filters" "button"
72
    And I set the following fields in the "Name" "core_reportbuilder > Filter" to these values:
81
    And I set the following fields in the "Name" "core_reportbuilder > Filter" to these values:
73
      | Name operator | Contains    |
82
      | Name operator | Contains    |
74
      | Name value    | category 1  |
83
      | Name value    | category 1  |
75
    And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
84
    And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
76
    Then the following should exist in the "reportbuilder-table" table:
85
    Then the following should exist in the "Cohorts" table:
77
      | Category  | Name                  |
86
      | Category  | Name                  |
78
      | Cat 1     | Cohort in category 1  |
87
      | Cat 1     | Cohort in category 1  |
79
    And the following should not exist in the "reportbuilder-table" table:
88
    And the following should not exist in the "Cohorts" table:
80
      | Category  | Name                  |
89
      | Category  | Name                  |
81
      | Cat 2     | Cohort in category 2  |
90
      | Cat 2     | Cohort in category 2  |
82
      | Cat 3     | Cohort in category 3  |
91
      | Cat 3     | Cohort in category 3  |
-
 
92
      | System    | System cohort         |
-
 
93
    And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
-
 
94
    And I set the following fields in the "Field checkbox" "core_reportbuilder > Filter" to these values:
-
 
95
      | Field checkbox operator | Yes    |
-
 
96
    And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
-
 
97
    And the following should exist in the "Cohorts" table:
-
 
98
      | Category  | Name           |
-
 
99
      | Cat 1     | Cohort with CF |
-
 
100
    And the following should not exist in the "Cohorts" table:
-
 
101
      | Category  | Name                  |
-
 
102
      | Cat 1     | Cohort in category 1  |
-
 
103
      | Cat 2     | Cohort in category 2  |
-
 
104
      | Cat 3     | Cohort in category 3  |