1 |
efrain |
1 |
@core_reportbuilder @javascript
|
|
|
2 |
Feature: Manage custom report columns
|
|
|
3 |
In order to manage the columns of custom reports
|
|
|
4 |
As an admin
|
|
|
5 |
I need to add, edit and delete columns in a report
|
|
|
6 |
|
|
|
7 |
Scenario: Add column to report
|
|
|
8 |
Given the following "core_reportbuilder > Reports" exist:
|
|
|
9 |
| name | source | default |
|
|
|
10 |
| My report | core_user\reportbuilder\datasource\users | 0 |
|
|
|
11 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
12 |
When I click on "Add column 'Full name'" "link"
|
|
|
13 |
Then I should see "Added column 'Full name'"
|
|
|
14 |
And I should see "Full name" in the "reportbuilder-table" "table"
|
|
|
15 |
|
|
|
16 |
Scenario: Search for and add column to report
|
|
|
17 |
Given the following "core_reportbuilder > Report" exists:
|
|
|
18 |
| name | My report |
|
|
|
19 |
| source | core_user\reportbuilder\datasource\users |
|
|
|
20 |
| default | 0 |
|
|
|
21 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
22 |
When I set the field "Search" in the "[data-region=sidebar-menu]" "css_element" to "Last name"
|
|
|
23 |
Then I should see "Last name" in the "[data-region=sidebar-menu]" "css_element"
|
|
|
24 |
And I should not see "Email address" in the "[data-region=sidebar-menu]" "css_element"
|
|
|
25 |
And I click on "Add column 'Last name'" "link"
|
|
|
26 |
And I should see "Added column 'Last name'"
|
|
|
27 |
And I should see "Last name" in the "reportbuilder-table" "table"
|
|
|
28 |
|
|
|
29 |
Scenario: Rename column in report
|
|
|
30 |
Given the following "core_reportbuilder > Report" exists:
|
|
|
31 |
| name | My report |
|
|
|
32 |
| source | core_user\reportbuilder\datasource\users |
|
|
|
33 |
| default | 0 |
|
|
|
34 |
And the following "core_reportbuilder > Column" exists:
|
|
|
35 |
| report | My report |
|
|
|
36 |
| uniqueidentifier | user:fullname |
|
|
|
37 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
38 |
When I set the field "Rename column 'Full name'" to "My renamed column"
|
|
|
39 |
And I reload the page
|
|
|
40 |
Then I should see "My renamed column" in the "reportbuilder-table" "table"
|
|
|
41 |
|
|
|
42 |
Scenario: Rename column in report using filters
|
|
|
43 |
Given the "multilang" filter is "on"
|
|
|
44 |
And the "multilang" filter applies to "content and headings"
|
|
|
45 |
And the following "core_reportbuilder > Reports" exist:
|
|
|
46 |
| name | source | default |
|
|
|
47 |
| My report | core_user\reportbuilder\datasource\users | 0 |
|
|
|
48 |
And the following "core_reportbuilder > Columns" exist:
|
|
|
49 |
| report | uniqueidentifier |
|
|
|
50 |
| My report | user:fullname |
|
|
|
51 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
52 |
When I set the field "Rename column 'Full name'" to "<span class=\"multilang\" lang=\"en\">English</span><span class=\"multilang\" lang=\"es\">Spanish</span>"
|
|
|
53 |
And I reload the page
|
|
|
54 |
Then I should see "English" in the "reportbuilder-table" "table"
|
|
|
55 |
And I should not see "Spanish" in the "reportbuilder-table" "table"
|
|
|
56 |
|
|
|
57 |
Scenario: Move column in report
|
|
|
58 |
Given the following "core_reportbuilder > Reports" exist:
|
|
|
59 |
| name | source | default |
|
|
|
60 |
| My report | core_user\reportbuilder\datasource\users | 0 |
|
|
|
61 |
And the following "core_reportbuilder > Columns" exist:
|
|
|
62 |
| report | uniqueidentifier |
|
|
|
63 |
| My report | user:fullname |
|
|
|
64 |
| My report | user:email |
|
|
|
65 |
| My report | user:lastaccess |
|
|
|
66 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
67 |
When I click on "Move column 'Last access'" "button"
|
|
|
68 |
And I click on "After \"Full name\"" "link" in the "Move column 'Last access'" "dialogue"
|
|
|
69 |
Then I should see "Moved column 'Last access'"
|
|
|
70 |
And "Last access" "text" should appear before "Email address" "text"
|
|
|
71 |
|
|
|
72 |
Scenario: Delete column from report
|
|
|
73 |
Given the following "core_reportbuilder > Reports" exist:
|
|
|
74 |
| name | source | default |
|
|
|
75 |
| My report | core_user\reportbuilder\datasource\users | 0 |
|
|
|
76 |
And the following "core_reportbuilder > Columns" exist:
|
|
|
77 |
| report | uniqueidentifier |
|
|
|
78 |
| My report | user:fullname |
|
|
|
79 |
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
|
|
|
80 |
When I click on "Delete column 'Full name'" "button"
|
|
|
81 |
And I click on "Delete" "button" in the "Delete column 'Full name'" "dialogue"
|
|
|
82 |
Then I should see "Deleted column 'Full name'"
|
|
|
83 |
And I should see "Nothing to display"
|