Skip to content

Commit

Permalink
add test for large dashboard pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed May 3, 2021
1 parent 31c4cb7 commit d6f02a8
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions x-pack/test/functional/apps/dashboard/reporting/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
});

describe('Preserve Layout', () => {
it('downloads a PDF file', async function () {
// Generating and then comparing reports can take longer than the default 60s timeout because the comparePngs
// function is taking about 15 seconds per comparison in jenkins.
it('downloads a PDF file: small dashboard', async function () {
this.timeout(300000);
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard');
Expand All @@ -200,10 +198,22 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
expect(res.get('content-type')).to.equal('application/pdf');
});

it('downloads a PDF file: large dashboard', async function () {
this.timeout(300000);
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.loadSavedDashboard('Large Dashboard');
await PageObjects.reporting.openPdfReportingPanel();
await PageObjects.reporting.clickGenerateReportButton();

const url = await PageObjects.reporting.getReportURL(60000);
const res = await PageObjects.reporting.getResponse(url);

expect(res.status).to.equal(200);
expect(res.get('content-type')).to.equal('application/pdf');
});

it('downloads a PDF file with saved search given EuiDataGrid enabled', async function () {
await kibanaServer.uiSettings.replace({ 'doc_table:legacy': false });
// Generating and then comparing reports can take longer than the default 60s timeout because the comparePngs
// function is taking about 15 seconds per comparison in jenkins.
this.timeout(300000);
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.loadSavedDashboard('Ecom Dashboard');
Expand Down

0 comments on commit d6f02a8

Please sign in to comment.