1 |
efrain |
1 |
@report @report_themeusage
|
|
|
2 |
Feature: Navigate to a theme usage report
|
|
|
3 |
In order to see a theme usage report
|
|
|
4 |
As an admin
|
|
|
5 |
I need to set a theme for user/course/category/cohort and view the report
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following config values are set as admin:
|
|
|
9 |
| allowuserthemes | 1 |
|
|
|
10 |
| allowcoursethemes | 1 |
|
|
|
11 |
| allowcategorythemes | 1 |
|
|
|
12 |
| allowcohortthemes | 1 |
|
|
|
13 |
And I log in as "admin"
|
|
|
14 |
|
|
|
15 |
Scenario: I am able to see theme usage report for all contexts overriding the default theme
|
|
|
16 |
Given the following "courses" exist:
|
|
|
17 |
| fullname | shortname | theme |
|
|
|
18 |
| Course 1 | course1 | boost |
|
|
|
19 |
| Course 2 | course2 | boost |
|
|
|
20 |
And the following "user" exists:
|
|
|
21 |
| username | student1 |
|
|
|
22 |
| firstname | Student |
|
|
|
23 |
| lastname | One |
|
|
|
24 |
| theme | boost |
|
|
|
25 |
And I navigate to "Reports > Theme usage" in site administration
|
|
|
26 |
And I set the field "Theme name" to "boost"
|
|
|
27 |
And I set the field "Usage type" to "all"
|
|
|
28 |
When I press "Get report"
|
|
|
29 |
Then the following should exist in the "reportbuilder-table" table:
|
|
|
30 |
| Usage type | Force theme |
|
|
|
31 |
| Course (2) | Boost |
|
|
|
32 |
| User (1) | Boost |
|
|
|
33 |
|
|
|
34 |
Scenario: I am able to see theme usage report for courses overriding the default theme
|
|
|
35 |
Given the following "course" exists:
|
|
|
36 |
| fullname | Course 1 |
|
|
|
37 |
| shortname | course1 |
|
|
|
38 |
| theme | boost |
|
|
|
39 |
And I navigate to "Reports > Theme usage" in site administration
|
|
|
40 |
And I set the field "Theme name" to "boost"
|
|
|
41 |
And I set the field "Usage type" to "course"
|
|
|
42 |
When I press "Get report"
|
|
|
43 |
Then the following should exist in the "reportbuilder-table" table:
|
|
|
44 |
| Course full name | Course short name | Force theme |
|
|
|
45 |
| Course 1 | course1 | Boost |
|
|
|
46 |
|
|
|
47 |
Scenario: I am able to see theme usage report for users overriding the default theme
|
|
|
48 |
Given the following "user" exists:
|
|
|
49 |
| username | student1 |
|
|
|
50 |
| firstname | Student |
|
|
|
51 |
| lastname | One |
|
|
|
52 |
| theme | boost |
|
|
|
53 |
And I navigate to "Reports > Theme usage" in site administration
|
|
|
54 |
And I set the field "Theme name" to "boost"
|
|
|
55 |
And I set the field "Usage type" to "user"
|
|
|
56 |
When I press "Get report"
|
|
|
57 |
Then the following should exist in the "reportbuilder-table" table:
|
|
|
58 |
| First name | Last name | Force theme |
|
|
|
59 |
| Student | One | Boost |
|
|
|
60 |
|
|
|
61 |
Scenario: I am able to see theme usage report for cohorts overriding the default theme
|
|
|
62 |
Given the following "cohort" exists:
|
|
|
63 |
| name | Cohort 1 |
|
|
|
64 |
| idnumber | cohort1 |
|
|
|
65 |
| context | system |
|
|
|
66 |
And I navigate to "Users > Accounts > Cohorts" in site administration
|
|
|
67 |
And I press "Edit" action in the "cohort1" report row
|
|
|
68 |
And I set the field "theme" to "boost"
|
|
|
69 |
And I press "Save changes"
|
|
|
70 |
And I navigate to "Reports > Theme usage" in site administration
|
|
|
71 |
And I set the field "Theme name" to "boost"
|
|
|
72 |
And I set the field "Usage type" to "cohort"
|
|
|
73 |
When I press "Get report"
|
|
|
74 |
Then the following should exist in the "reportbuilder-table" table:
|
|
|
75 |
| Name | Category | Force theme |
|
|
|
76 |
| Cohort 1 | System | Boost |
|
|
|
77 |
|
|
|
78 |
Scenario: I am able to see theme usage report for categories overriding the default theme
|
|
|
79 |
Given the following "categories" exist:
|
|
|
80 |
| name | category | idnumber |
|
|
|
81 |
| Category 1 | 0 | category1 |
|
|
|
82 |
And I navigate to "Courses > Manage courses and categories" in site administration
|
|
|
83 |
And I click on "edit" action for "Category 1" in management category listing
|
|
|
84 |
And I set the field "theme" to "boost"
|
|
|
85 |
And I press "Save changes"
|
|
|
86 |
And I navigate to "Reports > Theme usage" in site administration
|
|
|
87 |
And I set the field "Theme name" to "boost"
|
|
|
88 |
And I set the field "Usage type" to "category"
|
|
|
89 |
When I press "Get report"
|
|
|
90 |
Then the following should exist in the "reportbuilder-table" table:
|
|
|
91 |
| Category name | Course count | Force theme |
|
|
|
92 |
| Category 1 | 0 | Boost |
|