From 8ed39047a54f5f05e125d6c070258bed88cba74b Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Thu, 13 Jan 2022 13:17:27 +0100
Subject: [PATCH] OZG-1784 add keycloak roles and groups

---
 .../apps/goofy-e2e/src/fixtures/group/abtl-10_0_1.json       | 5 +++++
 .../apps/goofy-e2e/src/fixtures/group/abtl-10_5_1_2.json     | 5 +++++
 goofy-client/apps/goofy-e2e/src/fixtures/user/user_emil.json | 2 +-
 .../apps/goofy-e2e/src/fixtures/user/user_kfinder.json       | 3 ++-
 .../apps/goofy-e2e/src/fixtures/user/user_kordner.json       | 3 ++-
 .../apps/goofy-e2e/src/fixtures/user/user_sabine.json        | 3 +--
 goofy-client/apps/goofy-e2e/src/fixtures/user/user_zonk.json | 2 +-
 .../main-tests/postfach-mail/postfach-mail-error.e2e-spec.ts | 2 +-
 .../vorgang-detailansicht/vorgang-zurueckstellen.e2e-spec.ts | 2 +-
 9 files changed, 19 insertions(+), 8 deletions(-)
 create mode 100644 goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_0_1.json
 create mode 100644 goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_5_1_2.json

diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_0_1.json b/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_0_1.json
new file mode 100644
index 0000000000..e58c3a047f
--- /dev/null
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_0_1.json
@@ -0,0 +1,5 @@
+{
+	"name": "Abtl. 10.0.1 Versammlungsbehörde, Identitätsfeststellung, Fundbüro",
+	"path": "/Abtl. 10.0.1 Versammlungsbehörde, Identitätsfeststellung, Fundbüro",
+	"attributes": {"organisationseinheitId": ["9030229"]}
+}
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_5_1_2.json b/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_5_1_2.json
new file mode 100644
index 0000000000..523fdd257b
--- /dev/null
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/group/abtl-10_5_1_2.json
@@ -0,0 +1,5 @@
+{
+	"name": "Abtl. 10.5.1.2 Allgemeine Gefahrenabwehr und sonstige Ordnungsrechtsangelegenheiten",
+	"path": "/Abtl. 10.5.1.2 Allgemeine Gefahrenabwehr und sonstige Ordnungsrechtsangelegenheiten",
+	"attributes": {"organisationseinheitId": ["10363455"]}
+}
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_emil.json b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_emil.json
index b5e05e2c6f..0b284ad000 100644
--- a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_emil.json
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_emil.json
@@ -6,5 +6,5 @@
 	"fullName": "Emil Ernst",
 	"initials": "EE",
 	"dataTestId": "Emil_Ernst",
-	"einheitlicherAnsprechpartner": true
+	"realmRoles": ["EINHEITLICHER_ANSPRECHPARTNER"]
 }
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kfinder.json b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kfinder.json
index c5d1fad187..22f78e014b 100644
--- a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kfinder.json
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kfinder.json
@@ -1,4 +1,5 @@
 {
 	"name": "kfinder",
-	"password": "Katrinfinder"
+	"password": "Katrinfinder",
+	"groups": ["Abtl. 10.0.1 Versammlungsbehörde, Identitätsfeststellung, Fundbüro"]
 }
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kordner.json b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kordner.json
index 408b253306..f1f4ebbbea 100644
--- a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kordner.json
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_kordner.json
@@ -1,4 +1,5 @@
 {
 	"name": "kordner",
-	"password": "Klausordner"
+	"password": "Klausordner",
+	"groups": ["Abtl. 10.5.1.2 Allgemeine Gefahrenabwehr und sonstige Ordnungsrechtsangelegenheiten"]
 }
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_sabine.json b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_sabine.json
index 65897a1c18..5508c08d0b 100644
--- a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_sabine.json
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_sabine.json
@@ -1,5 +1,4 @@
 {
-	"uuid": "df385159-6055-4169-bb78-f5c6f60fe0cf",
 	"name": "sabine",
 	"password": "SuperCreativ",
 	"firstName": "Sabine",
@@ -7,5 +6,5 @@
 	"fullName": "Sabine Solala",
 	"initials": "SS",
 	"dataTestId": "Sabine_Solala",
-	"verwaltungUser": true
+	"realmRoles": ["VERWALTUNG_USER"]
 }
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_zonk.json b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_zonk.json
index eab922b306..21efc90fa0 100644
--- a/goofy-client/apps/goofy-e2e/src/fixtures/user/user_zonk.json
+++ b/goofy-client/apps/goofy-e2e/src/fixtures/user/user_zonk.json
@@ -1,5 +1,5 @@
 {
 	"name": "zonk",
 	"password": "Zonk4Nothing",
-	"verwaltungUser": true
+	"realmRoles": ["VERWALTUNG_USER"]
 }
\ No newline at end of file
diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail-error.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail-error.e2e-spec.ts
index f530256b60..0647ad6084 100644
--- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail-error.e2e-spec.ts
+++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/postfach-mail/postfach-mail-error.e2e-spec.ts
@@ -27,7 +27,7 @@ describe('PostfachMail error', () => {
 	const vorgang: VorgangE2E = createVorgang();
 	const postfachMailItem: PostfachMailItemE2E = {
 		...createPostfachNachrichtReplyItem(),
-		createdBy: getUserSabine().uuid,
+		createdBy: Cypress.env("sabineUuid"),
 		direction: DirectionE2E.OUT,
 		sentAt: '2022-12-02T15:00:00.790Z[UTC]',
 		sentSuccessful: false,
diff --git a/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.e2e-spec.ts b/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.e2e-spec.ts
index 60f369f368..d42287fb63 100644
--- a/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.e2e-spec.ts
+++ b/goofy-client/apps/goofy-e2e/src/integration/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.e2e-spec.ts
@@ -22,7 +22,7 @@ describe('Vorgang Zurueckstellen', () => {
 	const vorgangPage: VorgangPage = new VorgangPage();
 	const userContainer: UserProfileE2EComponent = vorgangPage.getVorgangDetailHeader().getUserContainer();
 
-	const vorgangZurueckstellen: VorgangE2E = { ...createVorgang(), name: 'DoBescheiden', status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: getUserSabine().uuid };
+	const vorgangZurueckstellen: VorgangE2E = { ...createVorgang(), name: 'DoBescheiden', status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: Cypress.env("sabineUuid") };
 	const vorgangZurueckstellenRevoke: VorgangE2E = { ...buildVorgang(objectIds[0], 'DoRevokeBescheiden'), status: VorgangStatusE2E.IN_BEARBEITUNG };
 
 	before(() => {
-- 
GitLab