Línea 1... |
Línea 1... |
1 |
@core_reportbuilder @javascript
|
1 |
@core @core_reportbuilder @javascript
|
2 |
Feature: Manage custom reports
|
2 |
Feature: Manage custom reports
|
3 |
In order to manage custom reports
|
3 |
In order to manage custom reports
|
4 |
As an admin
|
4 |
As an admin
|
5 |
I need to create new and edit existing reports
|
5 |
I need to create new and edit existing reports
|
Línea 94... |
Línea 94... |
94 |
| Report source | Users |
|
94 |
| Report source | Users |
|
95 |
| Tags | Cat, Dog |
|
95 |
| Tags | Cat, Dog |
|
96 |
And I click on "Save" "button" in the "New report" "dialogue"
|
96 |
And I click on "Save" "button" in the "New report" "dialogue"
|
97 |
And I click on "Close 'Manager report' editor" "button"
|
97 |
And I click on "Close 'Manager report' editor" "button"
|
98 |
And the following should exist in the "Reports list" table:
|
98 |
And the following should exist in the "Reports list" table:
|
99 |
| Name | Tags | Report source |
|
99 |
| Name | Tags | Report source |
|
100 |
| Manager report | Cat, Dog | Users |
|
100 |
| Manager report | Cat Dog | Users |
|
101 |
# Manager can edit their own report, but not those of other users.
|
101 |
# Manager can edit their own report, but not those of other users.
|
102 |
And I set the field "Edit report name" in the "Manager report" "table_row" to "Manager report (renamed)"
|
102 |
And I set the field "Edit report name" in the "Manager report" "table_row" to "Manager report (renamed)"
|
103 |
Then the "Edit report content" item should exist in the "Actions" action menu of the "Manager report (renamed)" "table_row"
|
103 |
Then the "Edit report content" item should exist in the "Actions" action menu of the "Manager report (renamed)" "table_row"
|
104 |
And "Edit report name" "link" should not exist in the "My report" "table_row"
|
104 |
And "Edit report name" "link" should not exist in the "My report" "table_row"
|
105 |
And "Actions" "actionmenu" should not exist in the "My report" "table_row"
|
105 |
And "Actions" "actionmenu" should not exist in the "My report" "table_row"
|
Línea 146... |
Línea 146... |
146 |
| Name | My renamed report |
|
146 |
| Name | My renamed report |
|
147 |
| Tags | Cat, Dog |
|
147 |
| Tags | Cat, Dog |
|
148 |
And I click on "Save" "button" in the "Edit report details" "dialogue"
|
148 |
And I click on "Save" "button" in the "Edit report details" "dialogue"
|
149 |
Then I should see "Report updated"
|
149 |
Then I should see "Report updated"
|
150 |
And the following should exist in the "Reports list" table:
|
150 |
And the following should exist in the "Reports list" table:
|
151 |
| Name | Tags | Report source |
|
151 |
| Name | Tags | Report source |
|
152 |
| My renamed report | Cat, Dog | Users |
|
152 |
| My renamed report | Cat Dog | Users |
|
Línea 153... |
Línea 153... |
153 |
|
153 |
|
154 |
Scenario Outline: Filter custom reports
|
154 |
Scenario Outline: Filter custom reports
|
155 |
Given the following "core_reportbuilder > Reports" exist:
|
155 |
Given the following "core_reportbuilder > Reports" exist:
|
156 |
| name | source | tags |
|
156 |
| name | source | tags |
|
157 |
| My users | core_user\reportbuilder\datasource\users | Cat, Dog |
|
157 |
| My users | core_user\reportbuilder\datasource\users | Cat, Dog |
|
158 |
| My courses | core_course\reportbuilder\datasource\courses | |
|
158 |
| My courses | core_course\reportbuilder\datasource\courses | |
|
159 |
And I log in as "admin"
|
159 |
And I log in as "admin"
|
- |
|
160 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
161 |
And the following should exist in the "Reports list" table:
|
- |
|
162 |
| Name | Tags | Report source |
|
- |
|
163 |
| My users | Cat Dog | Users |
|
160 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
164 |
| My courses | | Courses |
|
161 |
And I click on "Filters" "button"
|
165 |
And I click on "Filters" "button"
|
162 |
And I set the following fields in the "<filter>" "core_reportbuilder > Filter" to these values:
|
166 |
And I set the following fields in the "<filter>" "core_reportbuilder > Filter" to these values:
|
163 |
| <filter> operator | Is equal to |
|
167 |
| <filter> operator | Is equal to |
|
164 |
| <filter> value | <value> |
|
168 |
| <filter> value | <value> |
|
165 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
169 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
166 |
Then I should see "Filters applied"
|
170 |
Then I should see "Filters applied"
|
167 |
And the following should exist in the "Reports list" table:
|
171 |
And the following should exist in the "Reports list" table:
|
168 |
| Name | Tags | Report source |
|
172 |
| Name | Tags | Report source |
|
169 |
| My users | Cat, Dog | Users |
|
173 |
| My users | Cat Dog | Users |
|
170 |
And I should not see "My courses" in the "Reports list" "table"
|
174 |
And I should not see "My courses" in the "Reports list" "table"
|
171 |
Examples:
|
175 |
Examples:
|
172 |
| filter | value |
|
176 |
| filter | value |
|
173 |
| Name | My users |
|
177 |
| Name | My users |
|
174 |
| Report source | Users |
|
178 |
| Report source | Users |
|
Línea -... |
Línea 179... |
- |
|
179 |
| Tags | Cat |
|
- |
|
180 |
|
- |
|
181 |
Scenario: Filter custom reports by user
|
- |
|
182 |
Given the following "users" exist:
|
- |
|
183 |
| username | firstname | lastname |
|
- |
|
184 |
| user1 | User | 1 |
|
- |
|
185 |
And the following "core_reportbuilder > Report" exists:
|
- |
|
186 |
| name | My report |
|
- |
|
187 |
| source | core_user\reportbuilder\datasource\users |
|
- |
|
188 |
And I log in as "admin"
|
- |
|
189 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
190 |
And I click on "Filters" "button"
|
- |
|
191 |
And I set the following fields in the "Modified by" "core_reportbuilder > Filter" to these values:
|
- |
|
192 |
| Modified by operator | Select |
|
- |
|
193 |
| Modified by value | Admin User |
|
- |
|
194 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
195 |
Then I should see "Filters applied"
|
- |
|
196 |
And I should see "My report" in the "Reports list" "table"
|
- |
|
197 |
And I set the field "Modified by value" in the "Modified by" "core_reportbuilder > Filter" to "User 1"
|
- |
|
198 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
199 |
And I should see "Nothing to display"
|
- |
|
200 |
And "Reports list" "table" should not exist
|
- |
|
201 |
|
- |
|
202 |
Scenario Outline: Filter custom reports by date
|
- |
|
203 |
Given the following "core_reportbuilder > Report" exists:
|
- |
|
204 |
| name | My report |
|
- |
|
205 |
| source | core_user\reportbuilder\datasource\users |
|
- |
|
206 |
And I log in as "admin"
|
- |
|
207 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
208 |
And I click on "Filters" "button"
|
- |
|
209 |
And I set the following fields in the "<filter>" "core_reportbuilder > Filter" to these values:
|
- |
|
210 |
| <filter> operator | Range |
|
- |
|
211 |
| <filter> from | ##2 days ago## |
|
- |
|
212 |
| <filter> to | ##tomorrow## |
|
- |
|
213 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
214 |
Then I should see "Filters applied"
|
- |
|
215 |
And I should see "My report" in the "Reports list" "table"
|
- |
|
216 |
And I set the field "<filter> to" in the "<filter>" "core_reportbuilder > Filter" to "##yesterday##"
|
- |
|
217 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
218 |
And I should see "Nothing to display"
|
- |
|
219 |
And "Reports list" "table" should not exist
|
- |
|
220 |
Examples:
|
- |
|
221 |
| filter |
|
- |
|
222 |
| Time created |
|
- |
|
223 |
| Time modified |
|
- |
|
224 |
|
- |
|
225 |
Scenario: Filter custom reports by schedule presence
|
- |
|
226 |
Given the following "core_reportbuilder > Reports" exist:
|
- |
|
227 |
| name | source |
|
- |
|
228 |
| My users | core_user\reportbuilder\datasource\users |
|
- |
|
229 |
| My courses | core_course\reportbuilder\datasource\courses |
|
- |
|
230 |
And the following "core_reportbuilder > Schedules" exist:
|
- |
|
231 |
| report | name |
|
- |
|
232 |
| My users | My schedule |
|
- |
|
233 |
And I log in as "admin"
|
- |
|
234 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
235 |
And I click on "Filters" "button"
|
- |
|
236 |
And I set the field "Schedules operator" in the "Schedules" "core_reportbuilder > Filter" to "Yes"
|
- |
|
237 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
238 |
Then I should see "Filters applied"
|
- |
|
239 |
And I should see "My users" in the "Reports list" "table"
|
- |
|
240 |
And I should not see "My courses" in the "Reports list" "table"
|
- |
|
241 |
And I set the field "Schedules operator" in the "Schedules" "core_reportbuilder > Filter" to "No"
|
- |
|
242 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
243 |
And I should see "My courses" in the "Reports list" "table"
|
- |
|
244 |
And I should not see "My users" in the "Reports list" "table"
|
- |
|
245 |
|
- |
|
246 |
Scenario: Reset filters in system report
|
- |
|
247 |
Given the following "core_reportbuilder > Report" exists:
|
- |
|
248 |
| name | My report |
|
- |
|
249 |
| source | core_user\reportbuilder\datasource\users |
|
- |
|
250 |
And I log in as "admin"
|
- |
|
251 |
When I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
252 |
And I click on "Filters" "button"
|
- |
|
253 |
And I set the following fields in the "Name" "core_reportbuilder > Filter" to these values:
|
- |
|
254 |
| Name operator | Contains |
|
- |
|
255 |
| Name value | Lionel |
|
- |
|
256 |
And I click on "Apply" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
257 |
And I should see "Filters (1)" in the "#dropdownFiltersButton" "css_element"
|
- |
|
258 |
And I should see "Nothing to display"
|
- |
|
259 |
And I click on "Reset all" "button" in the "[data-region='report-filters']" "css_element"
|
- |
|
260 |
And I should not see "Filters (1)" in the "#dropdownFiltersButton" "css_element"
|
- |
|
261 |
And I should see "Filters" in the "#dropdownFiltersButton" "css_element"
|
- |
|
262 |
And "[data-region='report-filters']" "css_element" should be visible
|
- |
|
263 |
Then I should see "Filters reset"
|
- |
|
264 |
And the following fields in the "Name" "core_reportbuilder > Filter" match these values:
|
- |
|
265 |
| Name operator | Is any value |
|
175 |
| Tags | Cat |
|
266 |
And I should see "My report" in the "Reports list" "table"
|
176 |
|
267 |
|
177 |
Scenario: Custom report tags are not displayed if tagging is disabled
|
268 |
Scenario: Custom report tags are not displayed if tagging is disabled
|
178 |
Given the following config values are set as admin:
|
269 |
Given the following config values are set as admin:
|
179 |
| usetags | 0 |
|
270 |
| usetags | 0 |
|
Línea 187... |
Línea 278... |
187 |
| My report | Users |
|
278 |
| My report | Users |
|
188 |
And "Tags" "link" should not exist in the "Reports list" "table"
|
279 |
And "Tags" "link" should not exist in the "Reports list" "table"
|
189 |
And I click on "Filters" "button"
|
280 |
And I click on "Filters" "button"
|
190 |
And "Tags" "core_reportbuilder > Filter" should not exist
|
281 |
And "Tags" "core_reportbuilder > Filter" should not exist
|
Línea -... |
Línea 282... |
- |
|
282 |
|
- |
|
283 |
Scenario: Duplicate custom report
|
- |
|
284 |
Given the following "users" exist:
|
- |
|
285 |
| username | firstname | lastname | email | suspended |
|
- |
|
286 |
| user1 | User | 1 | user1@example.com | 1 |
|
- |
|
287 |
| user2 | User | 2 | user2@example.com | 0 |
|
- |
|
288 |
And the following "custom field categories" exist:
|
- |
|
289 |
| name | component | area | itemid |
|
- |
|
290 |
| Newcat | core_reportbuilder | report | 0 |
|
- |
|
291 |
And the following "custom fields" exist:
|
- |
|
292 |
| name | category | type | shortname | description | configdata |
|
- |
|
293 |
| Myshorttext | Newcat | text | f1 | d1 | |
|
- |
|
294 |
And the following "core_reportbuilder > Report" exists:
|
- |
|
295 |
| name | My report |
|
- |
|
296 |
| source | core_user\reportbuilder\datasource\users |
|
- |
|
297 |
| default | 1 |
|
- |
|
298 |
| customfield_f1 | My short text |
|
- |
|
299 |
And the following "core_reportbuilder > Audience" exists:
|
- |
|
300 |
| report | My report |
|
- |
|
301 |
| classname | core_reportbuilder\reportbuilder\audience\allusers |
|
- |
|
302 |
| configdata | |
|
- |
|
303 |
And the following "core_reportbuilder > Schedule" exists:
|
- |
|
304 |
| report | My report |
|
- |
|
305 |
| name | My schedule |
|
- |
|
306 |
When I log in as "admin"
|
- |
|
307 |
And I navigate to "Reports > Report builder > Custom reports" in site administration
|
- |
|
308 |
And I press "Duplicate report" action in the "My report" report row
|
- |
|
309 |
And I set the following fields in the "Duplicate report" "dialogue" to these values:
|
- |
|
310 |
| Name | My duplicated report |
|
- |
|
311 |
| Duplicate audiences | 1 |
|
- |
|
312 |
| Duplicate schedules | 1 |
|
- |
|
313 |
And I click on "Save" "button" in the "Duplicate report" "dialogue"
|
- |
|
314 |
Then I should see "My duplicated report"
|
- |
|
315 |
# Confirm we see the same columns in the report.
|
- |
|
316 |
And I should see "Full name" in the "Users" "table"
|
- |
|
317 |
And I should see "Username" in the "Users" "table"
|
- |
|
318 |
And I should see "Email address" in the "Users" "table"
|
- |
|
319 |
# Confirm we only see not suspended users in the report.
|
- |
|
320 |
And I should see "Admin User" in the "Users" "table"
|
- |
|
321 |
And I should see "User 2" in the "Users" "table"
|
- |
|
322 |
And I should not see "User 1" in the "Users" "table"
|
- |
|
323 |
And I click on the "Audience" dynamic tab
|
- |
|
324 |
And "All users" "core_reportbuilder > Audience" should exist
|
- |
|
325 |
And I click on the "Schedules" dynamic tab
|
- |
|
326 |
And I should see "My schedule" in the "Report schedules" "table"
|
- |
|
327 |
And I press "Edit details"
|
- |
|
328 |
And the field "Myshorttext" matches value "My short text"
|
191 |
|
329 |
|
192 |
Scenario: Delete custom report
|
330 |
Scenario: Delete custom report
|
193 |
Given the following "core_reportbuilder > Reports" exist:
|
331 |
Given the following "core_reportbuilder > Reports" exist:
|
194 |
| name | source |
|
332 |
| name | source |
|
195 |
| My report | core_user\reportbuilder\datasource\users |
|
333 |
| My report | core_user\reportbuilder\datasource\users |
|