Skip to content

Commit

Permalink
Stabilize closing toast (elastic#72097)
Browse files Browse the repository at this point in the history
* stabilize closing toast

* unskip test

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
flash1293 and elasticmachine authored Jul 22, 2020
1 parent b9aede4 commit 78ea171
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions test/functional/apps/dashboard/dashboard_snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) {
const dashboardPanelActions = getService('dashboardPanelActions');
const dashboardAddPanel = getService('dashboardAddPanel');

// FLAKY: https://github.com/elastic/kibana/issues/52854
describe.skip('dashboard snapshots', function describeIndexTests() {
describe('dashboard snapshots', function describeIndexTests() {
before(async function () {
await esArchiver.load('dashboard/current/kibana');
await kibanaServer.uiSettings.replace({
Expand Down
6 changes: 5 additions & 1 deletion test/functional/page_objects/common_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
async closeToastIfExists() {
const toastShown = await find.existsByCssSelector('.euiToast');
if (toastShown) {
await find.clickByCssSelector('.euiToast__closeButton');
try {
await find.clickByCssSelector('.euiToast__closeButton');
} catch (err) {
// ignore errors, toast clear themselves after timeout
}
}
}

Expand Down

0 comments on commit 78ea171

Please sign in to comment.