diff --git a/x-pack/test/functional/apps/lens/group3/lens_reporting.ts b/x-pack/test/functional/apps/lens/group3/lens_reporting.ts index effd3f8665756..2851a8122e4e1 100644 --- a/x-pack/test/functional/apps/lens/group3/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/group3/lens_reporting.ts @@ -22,6 +22,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const listingTable = getService('listingTable'); const security = getService('security'); + const browser = getService('browser'); describe('lens reporting', () => { before(async () => { @@ -117,6 +118,27 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('shareReportingCopyURL'); expect(await testSubjects.getVisibleText('shareReportingCopyURL')).to.eql('Copy POST URL'); }); + + it('should produce a valid URL for reporting', async () => { + await PageObjects.reporting.clickGenerateReportButton(); + await PageObjects.reporting.getReportURL(60000); + // navigate to the reporting page + await PageObjects.common.navigateToUrl('management', '/insightsAndAlerting'); + await testSubjects.click('reporting'); + // find the latest Lens report + await testSubjects.click('reportJobRow > euiCollapsedItemActionsButton'); + // click on Open in Kibana and check that all is ok + await testSubjects.click('reportOpenInKibanaApp'); + + const [reportingWindowHandler, lensWindowHandle] = await browser.getAllWindowHandles(); + await browser.switchToWindow(lensWindowHandle); + // verify some configuration + expect(await PageObjects.lens.getDimensionTriggerText('lnsXY_yDimensionPanel')).to.eql( + 'Average of bytes' + ); + await browser.closeCurrentWindow(); + await browser.switchToWindow(reportingWindowHandler); + }); } }); }