Skip to content

Commit

Permalink
stabilize closing toast
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed Jul 16, 2020
1 parent b7bb193 commit b24bfdc
Showing 1 changed file with 5 additions and 1 deletion.
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 b24bfdc

Please sign in to comment.