Skip to content

Commit c1724a6

Browse files
rashmivkulkarnidmlemeshkoelasticmachine
authored
using test_user with minimum privileges for lens reporting functional ui test (#76713) (#77914)
* 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> Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent cdbf4ff commit c1724a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

x-pack/test/functional/apps/lens/lens_reporting.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
1212
const es = getService('es');
1313
const esArchiver = getService('esArchiver');
1414
const listingTable = getService('listingTable');
15+
const security = getService('security');
1516

1617
describe('lens reporting', () => {
1718
before(async () => {
1819
await esArchiver.loadIfNeeded('lens/reporting');
20+
await security.testUser.setRoles(
21+
['test_logstash_reader', 'global_dashboard_read', 'reporting_user'],
22+
false
23+
);
1924
});
2025

2126
after(async () => {
@@ -25,6 +30,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
2530
refresh: true,
2631
body: { query: { match_all: {} } },
2732
});
33+
await security.testUser.restoreDefaults();
2834
});
2935

3036
it('should not cause PDF reports to fail', async () => {
@@ -33,7 +39,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
3339
await PageObjects.reporting.openPdfReportingPanel();
3440
await PageObjects.reporting.clickGenerateReportButton();
3541
const url = await PageObjects.reporting.getReportURL(60000);
36-
3742
expect(url).to.be.ok();
3843
});
3944
});

0 commit comments

Comments
 (0)