Skip to content

Commit

Permalink
validate toast
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed May 7, 2020
1 parent 9690315 commit 7bea090
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
const savedSearchPanel = await testSubjects.find('embeddablePanelHeading-EcommerceData');
await dashboardPanelActions.toggleContextMenu(savedSearchPanel);

await testSubjects.existOrFail('embeddablePanelAction-downloadCsvReport'); // wait for the full panel to display
await testSubjects.existOrFail('embeddablePanelAction-downloadCsvReport'); // wait for the full panel to display or else the test runner could click the wrong option!
await testSubjects.click('embeddablePanelAction-downloadCsvReport');
await testSubjects.existOrFail('csvDownloadStarted'); // validate toast panel

// check every 100ms for the file to exist in the download dir
// just wait up to 5 seconds
Expand All @@ -62,6 +63,8 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {

const fileExists = await success$.toPromise();
expect(fileExists).to.be(true);

// no need to validate download contents, API Integration tests do that some different variations
});
});
}

0 comments on commit 7bea090

Please sign in to comment.