diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-07-15 23:33:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 23:33:25 +0300 |
commit | c83b965dca4ed3cdad884495184fac9d968e3218 (patch) | |
tree | 4ead2ab46a7ae5badfb203e0ad0a5a187cc92e82 /tests/UI | |
parent | e2d9aac66838b342c75c92443e0a06b30f6d0447 (diff) |
Fix download of scheduled reports (#16214)
Diffstat (limited to 'tests/UI')
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png | 3 | ||||
-rw-r--r-- | tests/UI/specs/UIIntegration_spec.js | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png new file mode 100644 index 0000000000..d12de6a4f5 --- /dev/null +++ b/tests/UI/expected-screenshots/UIIntegrationTest_email_reports_download.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1863444f361ce1013c81c6b49541ad115b372faea03b890501831b3a30c903e +size 99867 diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index b3403a931c..7b18b1a809 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -921,7 +921,18 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? expect(await pageWrap.screenshot()).to.matchImage('email_reports'); }); + it('should show the generated report when clicking the download button', async function () { + await page.evaluate(function () { + $('#downloadReportForm_7').attr('target', ''); // do not open the download in new windows + }); + await page.click('#downloadReportForm_7 + a'); + await page.waitForNetworkIdle(); + + expect(await page.screenshot({fullPage: true})).to.matchImage('email_reports_download'); + }); + it('should load the scheduled reports when Edit button is clicked', async function () { + await page.goto("?" + generalParams + "&module=ScheduledReports&action=index"); await page.click('.entityTable tr:nth-child(4) button[title="Edit"]'); pageWrap = await page.$('.pageWrap'); |