MDL-72172 reportbuilder: fix cohort report source tests.

Choose aggregation method that has availability across all
supported databases; and allows sorting.

"Comma separated distinct values" doesn't fulfill either of
these criteria.
This commit is contained in:
Paul Holden
2021-11-01 15:42:35 +02:00
committed by Ilya Tregubov
parent 440799b641
commit 7071e4dfd4
+7 -7
View File
@@ -83,18 +83,18 @@ Feature: Manage custom reports for cohorts
Given the following "core_reportbuilder > Columns" exist:
| report | uniqueidentifier |
| My report | user:lastname |
And I change window size to "large"
And I am on the "My report" "reportbuilder > Editor" page logged in as "admin"
And I set the field "Rename column 'Surname'" to "Members"
And I reload the page
And I set the field "Aggregate column 'Surname'" to "Comma separated distinct values"
And I set the field "Rename column 'Surname'" to "Member count"
And I set the "Surname" column aggregation to "Count"
And I click on "Show/hide settings sidebar" "button"
And I click on "Show/hide 'Sorting'" "button"
And I change window size to "large"
And I click on "Move sorting for column 'Surname'" "button"
And I click on "To the top of the list" "link" in the "Move sorting for column 'Surname'" "dialogue"
And I click on "Enable sorting for column 'Surname'" "checkbox"
And "Another one" "table_row" should appear before "MDL-62161" "table_row"
# "New system cohort" has fewer members than "Another one" cohort.
And "New system cohort" "table_row" should appear before "Another one" "table_row"
When I click on "Sort column 'Surname' descending" "button"
Then I should see "Updated sorting for column 'Surname'"
And I wait "1" seconds
And "MDL-62161" "table_row" should appear before "Another one" "table_row"
# Switching sort direction should now show "Another one" cohort ahead of "New system cohort".
And "Another one" "table_row" should appear before "New system cohort" "table_row"