From 02430ee56291b6ea3f1709af4396eea3dadf3555 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Sat, 26 Nov 2022 18:30:42 +0100 Subject: [PATCH] MDL-76494 core_reportbuilder: behat test for downloading report --- .../tests/behat/customreports.feature | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/reportbuilder/tests/behat/customreports.feature b/reportbuilder/tests/behat/customreports.feature index 0be0833214f..d25196b7315 100644 --- a/reportbuilder/tests/behat/customreports.feature +++ b/reportbuilder/tests/behat/customreports.feature @@ -252,3 +252,24 @@ Feature: Manage custom reports And I click on "Close 'Report users' editor" "button" And I press "View" action in the "Report users" report row And I should see "admin" in the "reportbuilder-table" "table" + + Scenario Outline: Download custom report in different formats + Given the following "users" exist: + | username | firstname | lastname | + | user1 | User | 1 | + | user2 | User | 2 | + And the following "core_reportbuilder > Reports" exist: + | name | source | + | Report users | core_user\reportbuilder\datasource\users | + When I am on the "Report users" "reportbuilder > Editor" page logged in as "admin" + And I click on "Switch to preview mode" "button" + Then I set the field "Download table data as" to "" + And I press "Download" + Examples: + | format | + | Comma separated values (.csv) | + | Microsoft Excel (.xlsx) | + | HTML table | + | Javascript Object Notation (.json) | + | OpenDocument (.ods) | + | Portable Document Format (.pdf) |