Skip to content

Commit

Permalink
using test_user with minimum privileges for lens reporting functional…
Browse files Browse the repository at this point in the history
… ui test (elastic#76713)

* lens reporting test

* update chromedriver to 85

* checking bug fix

* hitting another bug - added as a comment

* Revert "update chromedriver to 85"

This reverts commit dcd8983.

* don't refresh the page when setting roles

* lens reporting test

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
3 people committed Sep 18, 2020
1 parent 44b0846 commit f67455a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x-pack/test/functional/apps/lens/lens_reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const es = getService('es');
const esArchiver = getService('esArchiver');
const listingTable = getService('listingTable');
const security = getService('security');

describe('lens reporting', () => {
before(async () => {
await esArchiver.loadIfNeeded('lens/reporting');
await security.testUser.setRoles(
['test_logstash_reader', 'global_dashboard_read', 'reporting_user'],
false
);
});

after(async () => {
Expand All @@ -26,6 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
refresh: true,
body: { query: { match_all: {} } },
});
await security.testUser.restoreDefaults();
});

it('should not cause PDF reports to fail', async () => {
Expand All @@ -34,7 +40,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.reporting.openPdfReportingPanel();
await PageObjects.reporting.clickGenerateReportButton();
const url = await PageObjects.reporting.getReportURL(60000);

expect(url).to.be.ok();
});
});
Expand Down

0 comments on commit f67455a

Please sign in to comment.