From 54c3131c206a35f968e3e66bb8c23909098e5921 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Mon, 27 Jun 2022 17:46:58 +0200
Subject: [PATCH] OZG-2348 impl workaround for multiple snackbars in test

---
 ...etailansicht.filtered-by-organisationseinheit.e2e-spec.ts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-detailansicht.filtered-by-organisationseinheit.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-detailansicht.filtered-by-organisationseinheit.e2e-spec.ts
index 33a90d9f0f..04c011a405 100644
--- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-detailansicht.filtered-by-organisationseinheit.e2e-spec.ts
+++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-detailansicht.filtered-by-organisationseinheit.e2e-spec.ts
@@ -116,7 +116,6 @@ describe('Vorgang-detailansicht filtered by organisationseinheit', () => {
 				waitForSpinnerToDisappear();
 
 				notExist(detailPage.getRoot());
-				contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
 			})
 
 			it('should show snackbar', () => {
@@ -125,9 +124,11 @@ describe('Vorgang-detailansicht filtered by organisationseinheit', () => {
 			})
 
 			it('should close snackbar on close button', () => {
-				snackbar.getCloseButton().click();
+				//FIXME Workaround, somewhere and somehow here are appearing multiple instances of snackbar(or the button)
+				snackbar.getCloseButton().click({ multiple: true });
 
 				notExist(snackbar.getCloseButton());
+				notExist(snackbar.getMessage());
 			})
 
 			it('should not open detailpage (for kfinder)', () => {
-- 
GitLab