From 9a48ef49a6ddb6a8dd42792862ba202ba5a63a64 Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Wed, 22 Jul 2020 13:35:50 +0200 Subject: [PATCH] Stabilize closing toast (#72097) (#72814) * stabilize closing toast * unskip test Co-authored-by: Elastic Machine # Conflicts: # test/functional/apps/dashboard/dashboard_snapshots.js # test/functional/page_objects/common_page.ts --- test/functional/apps/dashboard/dashboard_snapshots.js | 4 +--- test/functional/page_objects/common_page.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/functional/apps/dashboard/dashboard_snapshots.js b/test/functional/apps/dashboard/dashboard_snapshots.js index 63ba3822374ba..787e839aa08a5 100644 --- a/test/functional/apps/dashboard/dashboard_snapshots.js +++ b/test/functional/apps/dashboard/dashboard_snapshots.js @@ -28,9 +28,7 @@ export default function ({ getService, getPageObjects, updateBaselines }) { const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardAddPanel = getService('dashboardAddPanel'); - // SKIPPED as it is failing in ES PROMOTION: https://github.com/elastic/kibana/issues/68595 - // 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({ diff --git a/test/functional/page_objects/common_page.ts b/test/functional/page_objects/common_page.ts index efff6dbc8a8f9..31f8dd5014ad2 100644 --- a/test/functional/page_objects/common_page.ts +++ b/test/functional/page_objects/common_page.ts @@ -401,7 +401,11 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo async closeToastIfExists() { const toastShown = await find.existsByCssSelector('.euiToast'); if (toastShown) { - await this.closeToast(); + try { + await this.closeToast(); + } catch (err) { + // ignore errors, toast clear themselves after timeout + } } }