Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using test_user with minimum privileges for lens reporting functional ui test #76713

Merged
merged 16 commits into from
Sep 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -12,10 +12,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 @@ -25,6 +30,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 @@ -33,7 +39,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