From ad4969540e8b45198c8c20e51739f1f774c6bf39 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Mon, 27 Jun 2022 08:39:45 +0200
Subject: [PATCH] OZG-2348 OZG-2517 adjust navigation -> add waitForSpinner

---
 ...ltered-by-organisationseinheit.e2e-spec.ts | 20 ++++++-------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail.filtered-by-organisationseinheit.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail.filtered-by-organisationseinheit.e2e-spec.ts
index b0b322a960..bfd4a54ec4 100644
--- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail.filtered-by-organisationseinheit.e2e-spec.ts
+++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail.filtered-by-organisationseinheit.e2e-spec.ts
@@ -46,13 +46,14 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 		before(() => {
 			loginAsKfinder();
 
-			exist(vorgangList.getRoot());
 			waitForSpinnerToDisappear();
+			exist(vorgangList.getRoot());
 		})
 
 		it('should open postfachNachrichten page', () => {
 			logInParts(authorizedUrl);
 			visitUrl(authorizedUrl);
+			waitForSpinnerToDisappear();
 
 			exist(postfachMailPage.getBreadcrump());
 		});
@@ -60,6 +61,7 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 		it('should not open postfachNachrichten page', () => {
 			logInParts(forbiddenUrl);
 			visitUrl(forbiddenUrl);
+			waitForSpinnerToDisappear();
 
 			notExist(postfachMailPage.getBreadcrump());
 		})
@@ -68,12 +70,6 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 			exist(snackbar.getCloseButton());
 			contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
 		})
-
-		it('should close snackbar on close button', () => {
-			snackbar.getCloseButton().click();
-
-			notExist(snackbar.getMessage());
-		})
 	})
 
 	describe('on user kordner', () => {
@@ -83,13 +79,14 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 		before(() => {
 			loginAsKordner();
 
-			exist(vorgangList.getRoot());
 			waitForSpinnerToDisappear();
+			exist(vorgangList.getRoot());
 		})
 
 		it('should open postfachNachrichten page', () => {
 			logInParts(authorizedUrl);
 			visitUrl(authorizedUrl);
+			waitForSpinnerToDisappear();
 
 			exist(postfachMailPage.getBreadcrump())
 		})
@@ -97,6 +94,7 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 		it('should not open postfachNachrichten page', () => {
 			logInParts(forbiddenUrl);
 			visitUrl(forbiddenUrl);
+			waitForSpinnerToDisappear();
 
 			notExist(postfachMailPage.getBreadcrump())
 		})
@@ -105,12 +103,6 @@ describe('PostfachNachrichten filtered by organisationseinheit', () => {
 			exist(snackbar.getCloseButton());
 			contains(snackbar.getMessage(), MessagesE2E.HTTP_STATUS_FORBIDDEN);
 		})
-
-		it('should close snackbar on close button', () => {
-			snackbar.getCloseButton().click();
-
-			notExist(snackbar.getMessage());
-		})
 	})
 
 	function logInParts(toLog: string): void {
-- 
GitLab