Stabilize closing toast (#72097)

* stabilize closing toast

* unskip test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Joe Reuter 2020-07-22 11:28:23 +02:00 committed by GitHub
parent b9aede40d6
commit 78ea171a80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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({

View file

@ -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
}
}
}