Skip to content

Commit

Permalink
[Reporting/Test] Synchronize 7.x testing with master (elastic#63737)
Browse files Browse the repository at this point in the history
* sync with master

* sync with master

* sync reporting page_objects

* sync es_archive with master

* keep some things different in 7.x

* keep some more things different

* fix lens test

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
tsullivan and elasticmachine authored Apr 22, 2020
1 parent b82b846 commit e2262bf
Show file tree
Hide file tree
Showing 12 changed files with 1,547 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,12 @@ interface Props {
}

export const DownloadButton = ({ getUrl, job }: Props) => {
const downloadReport = () => {
window.open(getUrl(job.id));
};

return (
<EuiButton
size="s"
data-test-subj="downloadCompletedReportButton"
data-test-href={getUrl(job.id)}
onClick={() => {
downloadReport();
}}
href={getUrl(job.id)}
target="_blank"
>
<FormattedMessage
id="xpack.reporting.publicNotifier.downloadReportButtonLabel"
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/apps/lens/lens_reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { FtrProviderContext } from '../../ftr_provider_context';
// eslint-disable-next-line import/no-default-export
export default function({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'dashboard', 'reporting']);
const find = getService('find');
const esArchiver = getService('esArchiver');
const listingTable = getService('listingTable');

Expand All @@ -28,8 +27,9 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
await listingTable.clickItemLink('dashboard', 'Lens reportz');
await PageObjects.reporting.openPdfReportingPanel();
await PageObjects.reporting.clickGenerateReportButton();
const url = await PageObjects.reporting.getReportURL(60000);

expect(await find.byButtonText('Download report', undefined, 60000)).to.be.ok();
expect(url).to.be.ok();
});
});
}
Binary file not shown.
Loading

0 comments on commit e2262bf

Please sign in to comment.