[fix flaky on mki] add dismiss all toasts (#184659)

## Summary

resolves: https://github.com/elastic/kibana/issues/184655

Ran this from my local, against an MKI oblt cluster.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Tre 2024-06-04 11:45:34 +01:00 committed by GitHub
parent aa95692deb
commit 6e3b14fa19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,6 +17,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
const svlCommonNavigation = getPageObject('svlCommonNavigation');
const svlCommonPage = getPageObject('svlCommonPage');
const svlObltNavigation = getService('svlObltNavigation');
const toasts = getService('toasts');
describe('Cases list', function () {
before(async () => {
@ -258,6 +259,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
createNCasesBeforeDeleteAllAfter(1, getPageObject, getService);
it('deletes a case correctly', async () => {
await toasts.dismissAll();
await cases.casesTable.deleteCase(0);
await cases.casesTable.waitForTableToFinishLoading();
await cases.casesTable.validateCasesTableHasNthRows(0);