diff --git a/alfa-client/.eslintrc.json b/alfa-client/.eslintrc.json index fcc41f831b508d4b2bb811d29f936fcf3ceab95e..e98d8e08c82e782ad534c02d1ed0b25fbf55c9eb 100644 --- a/alfa-client/.eslintrc.json +++ b/alfa-client/.eslintrc.json @@ -18,6 +18,7 @@ "@typescript-eslint/explicit-member-accessibility": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-parameter-properties": "off", + "@typescript-eslint/no-inferrable-types": "off", "@nx/enforce-module-boundaries": [ "error", { diff --git a/alfa-client/apps/alfa-e2e/Jenkinsfile b/alfa-client/apps/alfa-e2e/Jenkinsfile index 18cd45748722fa9b6c1dd723af62878744e1b819..708a6ae7ec5545e5cc1fd1f313cc0456438324be 100644 --- a/alfa-client/apps/alfa-e2e/Jenkinsfile +++ b/alfa-client/apps/alfa-e2e/Jenkinsfile @@ -721,8 +721,7 @@ Map createUserIdsEnv(String userFolder, realm) { def keycloakUsers = getKeycloakUsers(realm) def usersFixtures = readUsersFixtures(userFolder) return usersFixtures.collectEntries { username, user -> - [(username + "Uuid") : keycloakUsers[username].id, - (username + "InternalId"): keycloakUsers[username].attributes.ozgCloudUserId[0]] + [(username + "InternalId"): keycloakUsers[username].attributes.ozgCloudUserId[0]] } } diff --git a/alfa-client/apps/alfa-e2e/Jenkinsfile-static b/alfa-client/apps/alfa-e2e/Jenkinsfile-static index 49a92dd823cb02a53f072fa3a55f21facc3c6527..84e22daeb5ba431dca79335274d5dccdf90413c7 100644 --- a/alfa-client/apps/alfa-e2e/Jenkinsfile-static +++ b/alfa-client/apps/alfa-e2e/Jenkinsfile-static @@ -430,8 +430,7 @@ Map createUserIdsEnv(String userFolder, realm) { def keycloakUsers = getKeycloakUsers(realm) def usersFixtures = readUsersFixtures(userFolder) return usersFixtures.collectEntries { username, user -> - [(username + "Uuid") : keycloakUsers[username].id, - (username + "InternalId"): keycloakUsers[username].attributes.ozgCloudUserId[0]] + [(username + "InternalId"): keycloakUsers[username].attributes.ozgCloudUserId[0]] } } diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts index b49d3d56c4c4e76db0731457e3390bd5bde3eb29..a1c2e7e2f0515bb98c8466706a0f90eaa85d511e 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/accessibility/vorgang-list.cy.ts @@ -7,7 +7,7 @@ import { MainPage, waitForSpinnerToDisappear } from 'apps/alfa-e2e/src/page-obje import { isKeyboardFocused } from 'apps/alfa-e2e/src/support/angular.util'; import { dropCollections, pressTab } from 'apps/alfa-e2e/src/support/cypress-helper'; import { exist, haveFocus } from 'apps/alfa-e2e/src/support/cypress.util'; -import { getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; describe('VorgangList Page', () => { const mainPage: MainPage = new MainPage(); @@ -20,8 +20,6 @@ describe('VorgangList Page', () => { const navigation: NavigationE2EComponent = mainPage.getNavigation(); before(() => { - initUsermanagerUsers([getUserManagerUserSabine()]); - loginAsSabine(); waitForSpinnerToDisappear(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts index 493a03c50135410cddc764a41f799763f3374855..d49b84e2861ad1f6711edbeb35a2b9fb09a0f98a 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/historie/historie.cy.ts @@ -41,7 +41,7 @@ import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main. import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections } from '../../../support/cypress-helper'; import { contains, exist, notExist } from '../../../support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, getUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { createVorgang, initVorgang } from '../../../support/vorgang-util'; registerLocaleData(localeDe, 'de', localeDeExtra); @@ -59,7 +59,7 @@ describe('Historie', () => { const assignUserCommand: CommandE2E = { ...buildCommand(CommandOrderE2E.ASSIGN_USER, vorgang._id.$oid, vorgang._id.$oid), - bodyObject: { assignedTo: getUserSabineInternalId() }, + bodyObject: { assignedTo: getUserSabine().id }, createdAt: { $date: '2020-01-01T10:00:00.000Z' } }; @@ -162,7 +162,6 @@ describe('Historie', () => { sendPostfachMailCommand, sendPostfachNachrichtCommand, receivePostfachNachrichtCommand, resendPostfachNachricht, createWiedervorlageCommand, editWiedervorlageCommand, wiedervorlageErledigenCommand, wiedervorlageWiedereroeffnenCommand ]); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/kommentar/kommentar.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/kommentar/kommentar.cy.ts index a2969f248a5432e7c46e15da84aa5218e82871be..703a33139d3cd21cc291eca5692ac104305fc93c 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/kommentar/kommentar.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/kommentar/kommentar.cy.ts @@ -28,7 +28,7 @@ import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main. import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections } from '../../../support/cypress-helper'; import { contains, exist, haveText, notExist } from '../../../support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, getUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { createVorgang, initVorgang } from '../../../support/vorgang-util'; describe('Kommentar', () => { @@ -44,7 +44,6 @@ describe('Kommentar', () => { before(() => { initVorgang(vorgang); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/navigation/navigation.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/navigation/navigation.cy.ts index 476373c8c33da9b2819e2ab7bed4db7be6452d56..7d7c0233f36a3e79935c3eb44037a63d3ccbb3da 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/navigation/navigation.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/navigation/navigation.cy.ts @@ -25,13 +25,12 @@ import { NavigationE2EComponent } from 'apps/alfa-e2e/src/components/navigation/ import { VorgangListE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-list.e2e.component'; import { VorgangSearchE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-search.e2e.component'; import { VorgangViewsE2EComponent } from 'apps/alfa-e2e/src/components/vorgang/vorgang-views.e2e.component'; -import { UsermanagerUserE2E } from 'apps/alfa-e2e/src/model/usermanager'; import { VorgangE2E } from 'apps/alfa-e2e/src/model/vorgang'; import { HeaderE2EComponent } from 'apps/alfa-e2e/src/page-objects/header.po'; import { MainPage, waitForSpinnerToDisappear } from 'apps/alfa-e2e/src/page-objects/main.po'; import { dropCollections, dropSearchIndex } from 'apps/alfa-e2e/src/support/cypress-helper'; import { enterWith, exist, haveText, notExist } from 'apps/alfa-e2e/src/support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { getUserSabine, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; import { buildVorgang, createVorgang, initSearchIndex, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util'; describe('Navigation', () => { @@ -46,19 +45,16 @@ describe('Navigation', () => { const views: VorgangViewsE2EComponent = mainPage.getViews(); - const usermanagerUserSabine: UsermanagerUserE2E = getUserManagerUserSabine(); - const vorgang: VorgangE2E = createVorgang(); const vorgangNotBeFiltered: VorgangE2E = { ...buildVorgang(objectIds[0], 'vorgangNotBeFiltered') }; - const vorgangAssigned: VorgangE2E = { ...buildVorgang(objectIds[1], 'vorgangAssigned'), assignedTo: getUserSabineInternalId() }; - const vorgangAssignedNotBeFiltered: VorgangE2E = { ...buildVorgang(objectIds[2], 'vorgangAssignedNotBeFiltered'), assignedTo: getUserSabineInternalId() }; + const vorgangAssigned: VorgangE2E = { ...buildVorgang(objectIds[1], 'vorgangAssigned'), assignedTo: getUserSabine().id }; + const vorgangAssignedNotBeFiltered: VorgangE2E = { ...buildVorgang(objectIds[2], 'vorgangAssignedNotBeFiltered'), assignedTo: getUserSabine().id }; const searchString: string = 'NotBeFiltered'; before(() => { initVorgaenge([vorgang, vorgangNotBeFiltered, vorgangAssigned, vorgangAssignedNotBeFiltered]); initSearchIndex([vorgang, vorgangNotBeFiltered, vorgangAssigned, vorgangAssignedNotBeFiltered]); - initUsermanagerUsers([usermanagerUserSabine, getUserManagerUserEmil(), getUserManagerUserPeter()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail-error.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail-error.cy.ts index 474854b017e90d98cfa90ef5f859a1ec882cbab0..84d2fc104feff28e8f308a98b4318ff68263f9a1 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail-error.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail-error.cy.ts @@ -32,7 +32,7 @@ import { PostfachMailPage } from '../../../page-objects/postfach-mail.component. import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections } from '../../../support/cypress-helper'; import { contains, exist, notExist } from '../../../support/cypress.util'; -import { getUserSabineInternalId, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { createPostfachNachrichtAttachedItem, createPostfachNachrichtReplyItem, initVorgangAttachedItem } from '../../../support/vorgang-attached-item-util'; import { createVorgang, initVorgang, objectIds } from '../../../support/vorgang-util'; @@ -50,7 +50,7 @@ describe('PostfachMail error', () => { const vorgang: VorgangE2E = createVorgang(); const postfachMailItem: PostfachMailItemE2E = { ...createPostfachNachrichtReplyItem(), - createdBy: getUserSabineInternalId(), + createdBy: getUserSabine().id, direction: DirectionE2E.OUT, sentAt: '2022-12-02T15:00:00.790Z[UTC]', sentSuccessful: false, diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail.cy.ts index 2185d3220edbb9acfadcc9a20eab19db517882ff..d8a7660fa444ee67d36ede3618b3e6915b0726b6 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-mail.cy.ts @@ -36,10 +36,10 @@ import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main. import { PostfachMailPage } from '../../../page-objects/postfach-mail.component.po'; import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections, readFileFromDownloads } from '../../../support/cypress-helper'; -import { containClass, contains, exist, notBeVisible, notContainClass, notExist, visible } from '../../../support/cypress.util'; -import { TEST_FILE_WITHOUT_CONTENT, TEST_FILE_WITH_CONTENT, TEST_FILE_WITH_CONTENT_4_MB } from '../../../support/data.util'; +import { contains, exist, notBeVisible, notExist, visible } from '../../../support/cypress.util'; +import { TEST_FILE_WITH_CONTENT, TEST_FILE_WITH_CONTENT_4_MB, TEST_FILE_WITHOUT_CONTENT } from '../../../support/data.util'; import { uploadEmptyFile, uploadFile } from '../../../support/file-upload'; -import { getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { loginAsSabine } from '../../../support/user-util'; import { createPostfachNachrichtAttachedItem, createPostfachNachrichtReplyItem, initVorgangAttachedItem } from '../../../support/vorgang-attached-item-util'; import { buildVorgang, createHasNewPostfachNachrichtClientAttribute, createHasPostfachNachrichtClientAttribute, createVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; import { expectIconWithBadge, expectIconWithoutBadge } from '../../../support/angular.util'; @@ -80,7 +80,6 @@ describe('PostfachMail', () => { before(() => { initVorgaenge([vorgang, vorgangWithoutPostfach, vorgangWithReply]); initVorgangAttachedItem([postfachNachrichtAttachedItem]); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachrichten.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachrichten.cy.ts index da761e11d027585bfe566b673de10abef2dc3a1e..a5e7fd444aca2e1b3b43b299b225bdd655c9ed34 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachrichten.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/postfach-mail/postfach-nachrichten.cy.ts @@ -35,7 +35,7 @@ import { countDownloadFiles, deleteDownloadFolder, dropCollections, interceptWit import { exist, notExist } from '../../../support/cypress.util'; import { LinkRelE2E } from '../../../support/linkrels'; import { removeLinkFromResource } from '../../../support/tech.util'; -import { getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { loginAsSabine } from '../../../support/user-util'; import { buildVorgang, createVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; @@ -54,7 +54,6 @@ describe('Postfach Nachrichten', () => { before(() => { initVorgaenge([vorgang, vorgangWithReply]); initVorgangAttachedItem([postfachNachrichtAttachedItem]); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-current-user-icon.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-current-user-icon.cy.ts index cc7aa7d1541ce33faa348b3e375117dcf18a7709..028a9c5a3582619d0f3c3d63274f7aa9a695a25d 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-current-user-icon.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-current-user-icon.cy.ts @@ -24,10 +24,10 @@ import { CurrentUserProfileE2EComponent } from 'apps/alfa-e2e/src/components/user-profile/current-user-profile.component.e2e'; import { UserE2E } from 'apps/alfa-e2e/src/model/user'; import { HeaderE2EComponent } from 'apps/alfa-e2e/src/page-objects/header.po'; -import { MainPage, waitForSpinnerToDisappear, waitforSpinnerToAppear } from 'apps/alfa-e2e/src/page-objects/main.po'; +import { MainPage, waitforSpinnerToAppear, waitForSpinnerToDisappear } from 'apps/alfa-e2e/src/page-objects/main.po'; import { dropCollections } from 'apps/alfa-e2e/src/support/cypress-helper'; import { exist, haveText } from 'apps/alfa-e2e/src/support/cypress.util'; -import { getUserManagerUserSabine, getUserSabine, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { getUserSabine, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; describe('Current User Profile', () => { const mainPage: MainPage = new MainPage(); @@ -40,8 +40,6 @@ describe('Current User Profile', () => { describe('for sabine', () => { before(() => { - initUsermanagerUsers([getUserManagerUserSabine()]); - loginAsSabine(); waitforSpinnerToAppear(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-assign-unassign.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-assign-unassign.cy.ts index bcfddd084bc8ec429fd218c339ea26aa77f43241..9e4c16b9526d607a94d03753b0c1575e7fe38218 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-assign-unassign.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-assign-unassign.cy.ts @@ -26,11 +26,11 @@ import { VorgangListItemE2EComponent } from '../../../components/vorgang/vorgang import { VorgangListE2EComponent } from '../../../components/vorgang/vorgang-list.e2e.component'; import { UserE2E } from '../../../model/user'; import { VorgangE2E } from '../../../model/vorgang'; -import { MainPage, waitForSpinnerToDisappear, waitforSpinnerToAppear } from '../../../page-objects/main.po'; +import { MainPage, waitforSpinnerToAppear, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections, wait } from '../../../support/cypress-helper'; import { enter, exist, haveText, notExist } from '../../../support/cypress.util'; -import { getUserDorothea, getUserManagerUserDorothea, getUserManagerUserSabine, getUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserDorothea, getUserSabine, loginAsSabine } from '../../../support/user-util'; import { createVorgang, initVorgang } from '../../../support/vorgang-util'; describe('User Profile im ausgewählten Vorgang', () => { @@ -47,7 +47,6 @@ describe('User Profile im ausgewählten Vorgang', () => { before(() => { initVorgang(vorgang); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserDorothea()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-postfach-nachricht-error.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-postfach-nachricht-error.cy.ts index f5557de7cb31ca4599ac2ee831d984c1e1dadf3f..06a500123723cd4604ba52609fbe9105207898cd 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-postfach-nachricht-error.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-postfach-nachricht-error.cy.ts @@ -30,7 +30,7 @@ import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main. import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections, interceptWithResponse, waitOfInterceptor } from '../../../support/cypress-helper'; import { exist, notExist } from '../../../support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { loginAsSabine } from '../../../support/user-util'; import { createPostfachNachrichtAttachedItem, createPostfachNachrichtReplyItem, initVorgangAttachedItem } from '../../../support/vorgang-attached-item-util'; import { createVorgang, initVorgang, objectIds } from '../../../support/vorgang-util'; @@ -55,7 +55,6 @@ describe('Postfach nachricht user profile on backend error', () => { before(() => { initVorgang(vorgang); initVorgangAttachedItem([vorgangAttachedItem]); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-vorgang-error.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-vorgang-error.cy.ts index 730efd510c6e2471922c80bd4e70b90388b4335b..bd1c3753441f2991e028a78cea58121ca5e04610 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-vorgang-error.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-profile/user-profile-icon-in-vorgang-error.cy.ts @@ -32,7 +32,7 @@ import { hasTooltip } from '../../../support/angular.util'; import { dropCollections, interceptWithResponse, waitOfInterceptor } from '../../../support/cypress-helper'; import { exist } from '../../../support/cypress.util'; import { MessagesE2E } from '../../../support/messages'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { loginAsSabine } from '../../../support/user-util'; import { createVorgang, initVorgang } from '../../../support/vorgang-util'; describe('User profile assigned to vorgang', () => { @@ -46,7 +46,6 @@ describe('User profile assigned to vorgang', () => { before(() => { initVorgang(vorgang); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-settings/user-settings.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-settings/user-settings.cy.ts index db92a54665aaea2a5821ac4704e0aabaffe14d9d..463b2da431831181bbccea36ed798cc37d42cd56 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-settings/user-settings.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/user-settings/user-settings.cy.ts @@ -29,7 +29,7 @@ import { MainPage, waitForSpinnerToDisappear } from 'apps/alfa-e2e/src/page-obje import { isChecked, isNotChecked } from 'apps/alfa-e2e/src/support/angular.util'; import { dropCollections, reload } from 'apps/alfa-e2e/src/support/cypress-helper'; import { exist } from 'apps/alfa-e2e/src/support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; import { createVorgang, initVorgang } from 'apps/alfa-e2e/src/support/vorgang-util'; describe('User Settings', () => { @@ -41,7 +41,6 @@ describe('User Settings', () => { before(() => { initVorgang(vorgang); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.cy.ts index 047f3d25ffd65fe372f7fc0f7142abab5ed0ee21..d0ce027c235f122ab3aafe0ab79b4feb2a45eed3 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-detailansicht/vorgang-zurueckstellen.cy.ts @@ -33,7 +33,7 @@ import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main. import { VorgangPage } from '../../../page-objects/vorgang.po'; import { dropCollections } from '../../../support/cypress-helper'; import { contains, exist, haveText, notExist } from '../../../support/cypress.util'; -import { getUserManagerUserEmil, getUserManagerUserPeter, getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { buildVorgang, createVorgang, initVorgaenge, objectIds } from '../../../support/vorgang-util'; registerLocaleData(localeDe, 'de', localeDeExtra); @@ -47,12 +47,11 @@ describe('Vorgang Zurueckstellen', () => { const userContainer: UserProfileE2EComponent = vorgangPage.getVorgangDetailHeader().getUserContainer(); const vorgangFormularButtons: VorgangFormularButtonsE2EComponent = vorgangPage.getFormularButtons(); - const vorgangZurueckstellen: VorgangE2E = { ...createVorgang(), name: 'DoBescheiden', status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: getUserSabineInternalId() }; + const vorgangZurueckstellen: VorgangE2E = { ...createVorgang(), name: 'DoBescheiden', status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: getUserSabine().id }; const vorgangZurueckstellenRevoke: VorgangE2E = { ...buildVorgang(objectIds[0], 'DoRevokeBescheiden'), status: VorgangStatusE2E.IN_BEARBEITUNG }; before(() => { initVorgaenge([vorgangZurueckstellen, vorgangZurueckstellenRevoke]); - initUsermanagerUsers([getUserManagerUserSabine(), getUserManagerUserPeter(), getUserManagerUserEmil()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-pages.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-pages.cy.ts index d01a77c315ba196c6c5392b93016066211ff9808..54a91a26d33982b16cf738de4bd92c00cb8e348c 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-pages.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-pages.cy.ts @@ -28,7 +28,7 @@ import { HttpMethodE2E } from '../../../model/util'; import { VorgangE2E, VorgangStatusE2E } from '../../../model/vorgang'; import { dropCollections, intercept, scrollToWindowBottom, waitOfInterceptor } from '../../../support/cypress-helper'; import { generateIds } from '../../../support/tech.util'; -import { getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { buildVorgang, initVorgaenge } from '../../../support/vorgang-util'; describe('VorgangList Pages', () => { @@ -37,7 +37,7 @@ describe('VorgangList Pages', () => { const navigation: NavigationE2EComponent = mainPage.getNavigation(); const PAGE_SIZE: number = 100; - const assignedTo: string = getUserSabineInternalId(); + const assignedTo: string = getUserSabine().id; before(() => { const vorgaenge: VorgangE2E[] = @@ -47,7 +47,6 @@ describe('VorgangList Pages', () => { createVorgaengeWithStatusAndAssignedTo(VorgangStatusE2E.ANGENOMMEN) ); initVorgaenge(vorgaenge); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); }) diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-views-pages.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-views-pages.cy.ts index ca9ed1364d607869f97ce1b916547aed1c99069a..1ae71957d4c093c4037e6c93f703c4415ab3d5dc 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-views-pages.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list-views-pages.cy.ts @@ -31,7 +31,7 @@ import { HttpMethodE2E } from '../../../model/util'; import { VorgangE2E, VorgangStatusE2E } from '../../../model/vorgang'; import { dropCollections, intercept, scrollToWindowBottom, waitOfInterceptor } from '../../../support/cypress-helper'; import { generateIds } from '../../../support/tech.util'; -import { getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; +import { getUserSabine, loginAsSabine } from '../../../support/user-util'; import { buildVorgang, initVorgaenge } from '../../../support/vorgang-util'; describe('VorgangList View Pages', () => { @@ -44,7 +44,7 @@ describe('VorgangList View Pages', () => { const views: VorgangViewsE2EComponent = mainPage.getViews(); const PAGE_SIZE: number = 100; - const assignedTo: string = getUserSabineInternalId(); + const assignedTo: string = getUserSabine().id; before(() => { const vorgaenge: VorgangE2E[] = @@ -61,7 +61,6 @@ describe('VorgangList View Pages', () => { createVorgaengeWithStatus(VorgangStatusE2E.VERWORFEN), createAssignedVorgaengeWithStatus(VorgangStatusE2E.VERWORFEN)); initVorgaenge(vorgaenge); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); exist(vorgangList.getRoot()); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list.search.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list.search.cy.ts index cde003f7648db8acb2ab860b0ca2d45029d7e433..d0b3c87dd27432984796ca8dd44521294ab06825 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list.search.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-list.search.cy.ts @@ -31,18 +31,18 @@ import { EingangE2E, VorgangE2E, VorgangStatusE2E } from 'apps/alfa-e2e/src/mode import { HeaderE2EComponent } from 'apps/alfa-e2e/src/page-objects/header.po'; import { VorgangPage } from 'apps/alfa-e2e/src/page-objects/vorgang.po'; import { dropCollections, dropSearchIndex } from 'apps/alfa-e2e/src/support/cypress-helper'; -import { AntragstellerE2ETestData, EingangE2ETestData, EingangHeaderE2ETestData, buildVorgang, createVorgang, initSearchIndex, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util'; +import { AntragstellerE2ETestData, buildVorgang, createVorgang, EingangE2ETestData, EingangHeaderE2ETestData, initSearchIndex, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util'; import { MainPage, waitForSpinnerToDisappear } from '../../../page-objects/main.po'; import { backspaceOn, enterWith, exist, haveText, haveValue, notExist } from '../../../support/cypress.util'; -import { UserRoleE2E, getUserManagerUserSabine, getUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from '../../../support/user-util'; -import { DirectionE2E, PostfachMailItemE2E, PostfachNachrichtMessageCodeE2E, VorgangAttachedItemE2E } from 'apps/alfa-e2e/src/model/vorgang-attached-item'; +import { getUserSabine, loginAsSabine, UserRoleE2E } from '../../../support/user-util'; +import { PostfachMailItemE2E, VorgangAttachedItemE2E } from 'apps/alfa-e2e/src/model/vorgang-attached-item'; import { WiedervorlageE2E } from 'apps/alfa-e2e/src/model/wiedervorlage'; import { createPostfachNachrichtAttachedItem, createPostfachNachrichtReplyItem, initVorgangAttachedItem } from 'apps/alfa-e2e/src/support/vorgang-attached-item-util'; -import { createWiedervorlageItem, createWiedervorlageAttachedItem } from 'apps/alfa-e2e/src/support/wiedervorlage-util'; +import { createWiedervorlageAttachedItem, createWiedervorlageItem } from 'apps/alfa-e2e/src/support/wiedervorlage-util'; import { KommentarE2E } from 'apps/alfa-e2e/src/model/kommentar'; import { createKommentar, createKommentarAttachedItem } from 'apps/alfa-e2e/src/support/kommentar.util'; import { WiedervorlageInVorgangE2EComponent } from 'apps/alfa-e2e/src/components/wiedervorlage/wiedervorlage-in-vorgang.e2e.component'; -import { KommentarInVorgangE2E, KommentareInVorgangE2EComponent } from 'apps/alfa-e2e/src/components/kommentar/kommentar-list.e2e.component'; +import { KommentarInVorgangE2E } from 'apps/alfa-e2e/src/components/kommentar/kommentar-list.e2e.component'; import { PostfachMailListItem } from 'apps/alfa-e2e/src/components/postfach/postfach-mail.e2e.component'; describe('VorgangList Suche', () => { @@ -60,7 +60,7 @@ describe('VorgangList Suche', () => { const requestId: string = faker.datatype.uuid(); const eingang: EingangE2E = { ...EingangE2ETestData, header: { ...EingangHeaderE2ETestData, requestId } } - const vorgangToStay: VorgangE2E = { ...createVorgang(), name: 'VorgangToStay', eingangs: [eingang], assignedTo: getUserSabineInternalId() }; + const vorgangToStay: VorgangE2E = { ...createVorgang(), name: 'VorgangToStay', eingangs: [eingang], assignedTo: getUserSabine().id }; const vorgangToDisappear: VorgangE2E = { ...buildVorgang(objectIds[0], 'VorgangToDisappear'), status: VorgangStatusE2E.NEU }; const vorgangHyphen: VorgangE2E = { ...buildVorgang(objectIds[1], 'Vorgang-mit-Bindestrich'), status: VorgangStatusE2E.NEU }; @@ -76,7 +76,6 @@ describe('VorgangList Suche', () => { before(() => { initVorgaenge([vorgangToStay, vorgangToDisappear, vorgangHyphen, vorgangWOHyphen]); initSearchIndex([vorgangToStay, vorgangToDisappear, vorgangHyphen, vorgangWOHyphen]); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); @@ -256,22 +255,22 @@ describe('VorgangList Suche', () => { const wiedervorlageForMatchBySearch: WiedervorlageE2E = { ...createWiedervorlageItem('WiedervorlageMatchBySearch'), done: false }; const wiedervorlageAttachedItemForMatchBySearch: VorgangAttachedItemE2E = { ...createWiedervorlageAttachedItem(objectIds[0], vorgang._id.$oid), item: wiedervorlageForMatchBySearch }; - + const kommentarForMatchBySearch: KommentarE2E = { ...createKommentar(), text: 'KommentarMatchBySearch' }; const kommentarAttachedItemForMatchBySearch: VorgangAttachedItemE2E = { ...createKommentarAttachedItem(objectIds[1], vorgang._id.$oid ), item: kommentarForMatchBySearch} const postfachNachrichtForMatchBySearch: PostfachMailItemE2E = { ...createPostfachNachrichtReplyItem(), - createdBy: getUserSabineInternalId(), + createdBy: getUserSabine().id, subject: 'PostfachNachrichtForMatchBySearch' } - + const postfachNachrichtAttachedItemForMatchBySearch: VorgangAttachedItemE2E = { ...createPostfachNachrichtAttachedItem(objectIds[2], vorgang._id.$oid), item: postfachNachrichtForMatchBySearch }; const previewListItemVorgang: VorgangSearchPreviewListItemE2EComponent = vorgangSearch.getVorgangSearchPreviewListItem(vorgang.name); - + const vorgangOtherName: string = 'VorgangOther'; const vorgangOther: VorgangE2E = { ...buildVorgang(objectIds[3], vorgangOtherName), status: VorgangStatusE2E.NEU }; @@ -283,14 +282,14 @@ describe('VorgangList Suche', () => { const postfachNachrichtForOther: PostfachMailItemE2E = { ...createPostfachNachrichtReplyItem(), - createdBy: getUserSabineInternalId(), + createdBy: getUserSabine().id, subject: 'PostfachNachrichtOther' } const postfachNachrichtAttachedItemForOther: VorgangAttachedItemE2E = { ...createPostfachNachrichtAttachedItem(objectIds[6], vorgangOther._id.$oid), item: postfachNachrichtForOther }; - + const previewListItemVorgangOther: VorgangSearchPreviewListItemE2EComponent = vorgangSearch.getVorgangSearchPreviewListItem(vorgangOther.name); - + before(() => { initVorgaenge([vorgang, vorgangOther]); initVorgangAttachedItem([ diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-view-wiedervorlagen.pages.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-view-wiedervorlagen.pages.cy.ts index 86c94c4871f7c7dbe4cb7c2dea506d70d3653879..765fe900d7d33eba09afcbb5d6af760a6df28534 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-view-wiedervorlagen.pages.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-view-wiedervorlagen.pages.cy.ts @@ -11,8 +11,8 @@ import { MainPage, waitForSpinnerToDisappear } from 'apps/alfa-e2e/src/page-obje import { dropCollections, intercept, scrollToWindowBottom, waitOfInterceptor } from 'apps/alfa-e2e/src/support/cypress-helper'; import { exist } from 'apps/alfa-e2e/src/support/cypress.util'; import { createDateToday, generateIds } from 'apps/alfa-e2e/src/support/tech.util'; -import { getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; -import { VORGANG_LIST_NEXT_FRIST_PARAM, VORGANG_LIST_PAGE_SIZE, buildVorgang, buildVorgangListPageLink, createAlfaClientAttributes, createNextWiedervorlageFristClientAttribute, initVorgaenge } from 'apps/alfa-e2e/src/support/vorgang-util'; +import { getUserSabine, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { buildVorgang, buildVorgangListPageLink, createAlfaClientAttributes, createNextWiedervorlageFristClientAttribute, initVorgaenge, VORGANG_LIST_NEXT_FRIST_PARAM, VORGANG_LIST_PAGE_SIZE } from 'apps/alfa-e2e/src/support/vorgang-util'; import { Interception } from 'cypress/types/net-stubbing'; registerLocaleData(localeDe, 'de', localeDeExtra); @@ -26,7 +26,7 @@ describe('VorgangList View Wiedervorlagen', () => { const views: VorgangViewsE2EComponent = mainPage.getViews(); - const assignedTo: string = getUserSabineInternalId(); + const assignedTo: string = getUserSabine().id; const ALLE_NAME_PREFIX: string = 'VorgangWithOpenWiedervorlagen_'; const MEINE_VORGAENGE_NAME_PREFIX: string = 'VorgangWithOpenWiedervorlagenAssigned_'; @@ -38,7 +38,6 @@ describe('VorgangList View Wiedervorlagen', () => { const vorgaenge: VorgangE2E[] = createVorgaenge(ALLE_NAME_PREFIX, (id: string, name: string) => buildVorgangWithOpenWiedervorlagen(id, name)).concat( createVorgaenge(MEINE_VORGAENGE_NAME_PREFIX, (id: string, name: string) => buildAssignedVorgangWithOpenWiedervorlagen(id, name))); initVorgaenge(vorgaenge); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); exist(vorgangList.getRoot()); diff --git a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-views-filter.cy.ts b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-views-filter.cy.ts index 1d6b3a557cf6418ddf22a0704bee8529e38567e6..b5dc59e95a343dd6979956957482a5fdc98ee485 100644 --- a/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-views-filter.cy.ts +++ b/alfa-client/apps/alfa-e2e/src/e2e/main-tests/vorgang-list/vorgang-views-filter.cy.ts @@ -13,7 +13,7 @@ import { isButtonToggleChecked, isButtonToggleNotChecked } from 'apps/alfa-e2e/s import { dropCollections, dropSearchIndex } from 'apps/alfa-e2e/src/support/cypress-helper'; import { containClass, contains, enterWith, exist, haveLength, haveText, notContainClass } from 'apps/alfa-e2e/src/support/cypress.util'; import { createDateToday } from 'apps/alfa-e2e/src/support/tech.util'; -import { getUserManagerUserSabine, getUserSabineInternalId, initUsermanagerUsers, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; +import { getUserSabine, loginAsSabine } from 'apps/alfa-e2e/src/support/user-util'; import { buildVorgang, createAlfaClientAttributes, createNextWiedervorlageFristClientAttribute, createVorgang, initSearchIndex, initVorgaenge, objectIds } from 'apps/alfa-e2e/src/support/vorgang-util'; registerLocaleData(localeDe, 'de', localeDeExtra); @@ -40,28 +40,28 @@ describe('Vorgang views and filter', () => { const navigation: NavigationE2EComponent = mainPage.getNavigation(); - const vorgangNeuAssigned: VorgangE2E = { ...createVorgang(), name: 'VorgangNeuAssigned', status: VorgangStatusE2E.NEU, assignedTo: getUserSabineInternalId() }; + const vorgangNeuAssigned: VorgangE2E = { ...createVorgang(), name: 'VorgangNeuAssigned', status: VorgangStatusE2E.NEU, assignedTo: getUserSabine().id }; const vorgangNeuUnassigned: VorgangE2E = { ...buildVorgang(objectIds[0], 'VorgangNeuUnassigned'), status: VorgangStatusE2E.NEU }; - const vorgangAngenommenAssigned: VorgangE2E = { ...buildVorgang(objectIds[1], 'VorgangAngenommenAssigned'), status: VorgangStatusE2E.ANGENOMMEN, assignedTo: getUserSabineInternalId() }; + const vorgangAngenommenAssigned: VorgangE2E = { ...buildVorgang(objectIds[1], 'VorgangAngenommenAssigned'), status: VorgangStatusE2E.ANGENOMMEN, assignedTo: getUserSabine().id }; const vorgangAngenommenUnassigned: VorgangE2E = { ...buildVorgang(objectIds[2], 'VorgangAngenommenUnassigned'), status: VorgangStatusE2E.ANGENOMMEN, clientAttributes: createAlfaClientAttributes(ClientAttributeNameE2E.NEXT_WIEDERVORLAGE_FRIST, createNextWiedervorlageFristClientAttribute(createDateToday())) }; - const vorgangInBearbeitungAssigned: VorgangE2E = { ...buildVorgang(objectIds[3], 'VorgangInBearbeitungAssigned'), status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: getUserSabineInternalId() }; + const vorgangInBearbeitungAssigned: VorgangE2E = { ...buildVorgang(objectIds[3], 'VorgangInBearbeitungAssigned'), status: VorgangStatusE2E.IN_BEARBEITUNG, assignedTo: getUserSabine().id }; const vorgangInBearbeitungUnassigned: VorgangE2E = { ...buildVorgang(objectIds[4], 'VorgangInBearbeitungUnassigned'), status: VorgangStatusE2E.IN_BEARBEITUNG }; - const vorgangBeschiedenAssigned: VorgangE2E = { ...buildVorgang(objectIds[5], 'VorgangBeschiedenAssigned'), status: VorgangStatusE2E.BESCHIEDEN, assignedTo: getUserSabineInternalId() }; + const vorgangBeschiedenAssigned: VorgangE2E = { ...buildVorgang(objectIds[5], 'VorgangBeschiedenAssigned'), status: VorgangStatusE2E.BESCHIEDEN, assignedTo: getUserSabine().id }; const vorgangBeschiedenUnassigned: VorgangE2E = { ...buildVorgang(objectIds[6], 'VorgangBeschiedenUnassigned'), status: VorgangStatusE2E.BESCHIEDEN }; - const vorgangAbgeschlossenAssigned: VorgangE2E = { ...buildVorgang(objectIds[7], 'VorgangAbgeschlossenAssigned'), status: VorgangStatusE2E.ABGESCHLOSSEN, assignedTo: getUserSabineInternalId(), + const vorgangAbgeschlossenAssigned: VorgangE2E = { ...buildVorgang(objectIds[7], 'VorgangAbgeschlossenAssigned'), status: VorgangStatusE2E.ABGESCHLOSSEN, assignedTo: getUserSabine().id, clientAttributes: createAlfaClientAttributes(ClientAttributeNameE2E.NEXT_WIEDERVORLAGE_FRIST, createNextWiedervorlageFristClientAttribute(createDateToday())) }; const vorgangAbgeschlossenUnassigned: VorgangE2E = { ...buildVorgang(objectIds[8], 'VorgangAbgeschlossenUnassigned'), status: VorgangStatusE2E.ABGESCHLOSSEN }; - const vorgangVerworfenAssigned: VorgangE2E = { ...buildVorgang(objectIds[9], 'VorgangVerworfenAssigned'), status: VorgangStatusE2E.VERWORFEN, assignedTo: getUserSabineInternalId() }; + const vorgangVerworfenAssigned: VorgangE2E = { ...buildVorgang(objectIds[9], 'VorgangVerworfenAssigned'), status: VorgangStatusE2E.VERWORFEN, assignedTo: getUserSabine().id }; const vorgangVerworfenUnassigned: VorgangE2E = { ...buildVorgang(objectIds[10], 'VorgangVerworfenUnassigned'), status: VorgangStatusE2E.VERWORFEN }; - const vorgangZuLoeschenAssigned: VorgangE2E = { ...buildVorgang(objectIds[11], 'VorgangZuLoeschenAssigned'), status: VorgangStatusE2E.ZU_LOESCHEN, assignedTo: getUserSabineInternalId() }; + const vorgangZuLoeschenAssigned: VorgangE2E = { ...buildVorgang(objectIds[11], 'VorgangZuLoeschenAssigned'), status: VorgangStatusE2E.ZU_LOESCHEN, assignedTo: getUserSabine().id }; const vorgangZuLoeschenUnassigned: VorgangE2E = { ...buildVorgang(objectIds[12], 'VorgangZuLoeschenUnassigned'), status: VorgangStatusE2E.ZU_LOESCHEN }; const vorgangNeuAssignedInList: VorgangListItemE2EComponent = vorgangList.getListItem(vorgangNeuAssigned.name); @@ -99,7 +99,6 @@ describe('Vorgang views and filter', () => { initVorgaenge(vorgaenge); initSearchIndex(vorgaenge); - initUsermanagerUsers([getUserManagerUserSabine()]); loginAsSabine(); diff --git a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_dorothea.json b/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_dorothea.json deleted file mode 100644 index 95d65b192d7e021e286a0d09198c1d5833f26d9d..0000000000000000000000000000000000000000 --- a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_dorothea.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "_id": { - "$oid": "645e6fa20cfafc0fbbe6bf73" - }, - "createdAt": { - "$date": "2021-12-20T11:17:56.489Z" - }, - "deleted": false, - "keycloakUserId": "b5f84a21-cf2f-4d68-8717-f6f188d07201", - "firstName": "Dorothea", - "fullName": "Dorothea Doe", - "lastName": "Doe", - "lastSyncTimestamp": 1663585874687, - "organisationsEinheitIds": ["12345678"], - "roles": ["VERWALTUNG_USER"], - "username": "dorothea" -} diff --git a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_emil.json b/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_emil.json deleted file mode 100644 index 069045234bdabbeb80080e2301beab46958c10e1..0000000000000000000000000000000000000000 --- a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_emil.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "_id": { - "$oid": "63284e54c39b316b2ad02e2a" - }, - "createdAt": { - "$date": "2022-08-25T08:29:45.025Z" - }, - "deleted": false, - "keycloakUserId": "108ee867-7290-466d-813f-ab1dc95d3691", - "firstName": "Emil", - "fullName": "Emil Ansprechpartner", - "lastName": "Ansprechpartner", - "lastSyncTimestamp": 1663585874687, - "organisationsEinheitIds": [], - "roles": [ - "EINHEITLICHER_ANSPRECHPARTNER" - ], - "username": "emil" - } \ No newline at end of file diff --git a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_peter.json b/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_peter.json deleted file mode 100644 index 540acf41530c21b619ffa8e2761a3c8b31ecad3a..0000000000000000000000000000000000000000 --- a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_peter.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "_id": { - "$oid": "63284e55c39b316b2ad02e2c" - }, - "createdAt": { - "$date": "2022-02-18T09:21:24.340Z" - }, - "deleted": false, - "keycloakUserId": "63d42f8f-303b-4560-9b11-e9211b0ae87e", - "firstName": "Peter", - "fullName": "Peter von der Post", - "lastName": "von der Post", - "lastSyncTimestamp": 1663585874687, - "organisationsEinheitIds": [], - "roles": [ - "VERWALTUNG_POSTSTELLE" - ], - "username": "peter" - } \ No newline at end of file diff --git a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_sabine.json b/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_sabine.json deleted file mode 100644 index 05cacad8008bf0ddd6e7daccbe4ee94008912baf..0000000000000000000000000000000000000000 --- a/alfa-client/apps/alfa-e2e/src/fixtures/usermanager/usermanager_user_sabine.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "_id": { - "$oid": "63284e55c39b316b2ad02e2d" - }, - "createdAt": { - "$date": "2021-12-20T11:17:56.489Z" - }, - "deleted": false, - "email": "susanne.fischer.dataport+sabine@gmail.com", - "keycloakUserId": "2ccf0c13-da74-4516-ae3d-f46d30e8ec0c", - "firstName": "Sabine", - "fullName": "Sabine Sach", - "lastName": "Sach", - "lastSyncTimestamp": 1663585874687, - "organisationsEinheitIds": [ - "12345678" - ], - "roles": [ - "VERWALTUNG_USER" - ], - "username": "sabine" - } \ No newline at end of file diff --git a/alfa-client/apps/alfa-e2e/src/model/user.ts b/alfa-client/apps/alfa-e2e/src/model/user.ts index 00449d176aea80698344e14bb1c1db83d20bd373..bd171a93203440338ee74ff2eadad2685f714f8b 100644 --- a/alfa-client/apps/alfa-e2e/src/model/user.ts +++ b/alfa-client/apps/alfa-e2e/src/model/user.ts @@ -22,7 +22,6 @@ * unter der Lizenz sind dem Lizenztext zu entnehmen. */ export interface UserE2E { - uuid: string; id: string; name: string; password: string; diff --git a/alfa-client/apps/alfa-e2e/src/support/command-util.ts b/alfa-client/apps/alfa-e2e/src/support/command-util.ts index f7ef896b3eac6dae35a87597d64178944a7ac614..66650a060a9919d70344d0a12af91eaee3178e7e 100644 --- a/alfa-client/apps/alfa-e2e/src/support/command-util.ts +++ b/alfa-client/apps/alfa-e2e/src/support/command-util.ts @@ -23,12 +23,12 @@ */ import { CommandE2E, CommandOrderE2E } from '../model/command'; import { initCommandData } from './cypress-helper'; -import { getUserSabineInternalId } from './user-util'; +import { getUserSabine } from './user-util'; const commandFixture: CommandE2E = require('../fixtures/command/command.json'); export function createCommand(): CommandE2E { - return { ...commandFixture, createdBy: getUserSabineInternalId() }; + return { ...commandFixture, createdBy: getUserSabine().id }; } export function buildCommand(order: CommandOrderE2E, vorgangId: string, relationId: string): CommandE2E { diff --git a/alfa-client/apps/alfa-e2e/src/support/cypress-helper.ts b/alfa-client/apps/alfa-e2e/src/support/cypress-helper.ts index 7a926edfbbaf1a0b45979a7d5bd8527ff3d2a3af..6555427b591e9d478fb017da37a2e3ed181d7a6c 100644 --- a/alfa-client/apps/alfa-e2e/src/support/cypress-helper.ts +++ b/alfa-client/apps/alfa-e2e/src/support/cypress-helper.ts @@ -30,13 +30,11 @@ import { VorgangAttachedItemE2E } from '../model/vorgang-attached-item'; enum CypressTasks { DROP_COLLECTIONS = 'dropCollections', - DROP_USER_MANAGER_COLLECTIONS = 'dropUserManagerCollections', INIT_COMMAND_DATA = 'initCommandData', INIT_GRID_FS_FILE_DATA = 'initGridFsFileData', INIT_GRID_FS_CHUNK_DATA = 'initGridFsChunkData', INIT_VORGANG_DATA = 'initVorgangData', INIT_VORGANG_ATTACHED_ITEM_DATA = 'initVorgangAttachedItemData', - INIT_USERMANAGER_DATA = 'initUsermanagerData', COUNT_FILES = 'countFiles', DELETE_FOLDER = 'deleteFolder' } @@ -108,14 +106,8 @@ export function dropSearchIndex(){ cy.removeAllDocumentsFromSearchIndex(); } -export function initUsermanagerData(data: UsermanagerUserE2E[]): void { - cy.task(CypressTasks.DROP_USER_MANAGER_COLLECTIONS, [MongoCollections.USER]); - cy.task(CypressTasks.INIT_USERMANAGER_DATA, { collection: MongoCollections.USER, data }); -} - export function dropCollections() { cy.task(CypressTasks.DROP_COLLECTIONS, [MongoCollections.COMMAND, MongoCollections.VORGANG, MongoCollections.VORGANG_ATTACHED_ITEM, MongoCollections.FS_FILES, MongoCollections.FS_CHUNKS]); - cy.task(CypressTasks.DROP_USER_MANAGER_COLLECTIONS, [MongoCollections.USER]); } export function countDownloadFiles(): Cypress.Chainable<number> { diff --git a/alfa-client/apps/alfa-e2e/src/support/cypress-tasks.ts b/alfa-client/apps/alfa-e2e/src/support/cypress-tasks.ts index b8a1bac27dbf39c722b3c2e268d4ef58780c6e54..70567655e562683a1a1a360e5f78eee7a436a984 100644 --- a/alfa-client/apps/alfa-e2e/src/support/cypress-tasks.ts +++ b/alfa-client/apps/alfa-e2e/src/support/cypress-tasks.ts @@ -31,24 +31,14 @@ module.exports = (on: any, config: any) => { insertIntoDatabase(config, collection, parseVorgangAttachedItemData(data)); return 0; }, - initUsermanagerData({collection, data}) { - console.log('initUsermanagerData'); - insertIntoUserManagerDatabase(config, collection, parseUserData(data)); - return 0; - }, dropCollections(collections) { console.log('dropCollections: ', collections); dropCollectionsFromDatabase(config, collections); return 0; }, - dropUserManagerCollections(collections) { - console.log('dropUserManagerCollections: ', collections); - dropUserManagerCollectionsFromDatabase(config, collections); - return 0; - }, countFiles(folderName:string) { console.log('counting files in folder %s', folderName); - return countFiles(folderName); + return countFiles(folderName); }, deleteFolder(folderName:string) { console.log('deleting folder %s', folderName); @@ -278,10 +268,6 @@ function getDatabase(config){ return config.env.database } -function dropUserManagerCollectionsFromDatabase(config, collections){ - dropCollections(getUserManagerDatabaseUrl(config), getUserManagerDatabase(config), collections); -} - function getUserManagerDatabaseUrl(config){ return config.env.userManager.dbUrl; } diff --git a/alfa-client/apps/alfa-e2e/src/support/kommentar.util.ts b/alfa-client/apps/alfa-e2e/src/support/kommentar.util.ts index fb3554a7f4243ddbffc928cf5dfd13af14ba547a..810c49742416ff622af26207002aa7284a33bccb 100644 --- a/alfa-client/apps/alfa-e2e/src/support/kommentar.util.ts +++ b/alfa-client/apps/alfa-e2e/src/support/kommentar.util.ts @@ -23,13 +23,13 @@ */ import { KommentarE2E } from '../model/kommentar'; import { VorgangAttachedItemClientE2E, VorgangAttachedItemE2E, VorgangAttachedItemNameE2E } from '../model/vorgang-attached-item'; -import { getUserSabineInternalId } from './user-util'; +import { getUserSabine } from './user-util'; import { VORGANG_ATTACHED_ITEM_CLASS } from './vorgang-attached-item-util'; const kommentarFixture: KommentarE2E = require('../fixtures/kommentar/kommentar.json'); export function createKommentar(): KommentarE2E { - return { ...kommentarFixture, createdBy: getUserSabineInternalId() }; + return { ...kommentarFixture, createdBy: getUserSabine().id }; } export function createKommentarAttachedItem(_id: string, vorgangId: string): VorgangAttachedItemE2E { diff --git a/alfa-client/apps/alfa-e2e/src/support/user-util.ts b/alfa-client/apps/alfa-e2e/src/support/user-util.ts index c47fe58593b45d6a252c51198830b5ebf6c46a71..0049140a38de465fc08cdea4c44adbf4047510f4 100644 --- a/alfa-client/apps/alfa-e2e/src/support/user-util.ts +++ b/alfa-client/apps/alfa-e2e/src/support/user-util.ts @@ -22,52 +22,21 @@ * unter der Lizenz sind dem Lizenztext zu entnehmen. */ import { UserE2E } from '../model/user'; -import { UsermanagerUserE2E } from '../model/usermanager'; -import { getCypressEnv, initUsermanagerData, login } from './cypress-helper'; +import { getCypressEnv, login } from './cypress-helper'; const sabineFixture: UserE2E = require('../fixtures/user-main/user_sabine.json'); const dorotheaFixture: UserE2E = require('../fixtures/user-main/user_dorothea.json'); -const userManagerSabineFixture: UsermanagerUserE2E = require('../fixtures/usermanager/usermanager_user_sabine.json'); -const userManagerPeterFixture: UsermanagerUserE2E = require('../fixtures/usermanager/usermanager_user_peter.json'); -const userManagerEmilFixture: UsermanagerUserE2E = require('../fixtures/usermanager/usermanager_user_emil.json'); -const userManagerDorotheaFixture: UsermanagerUserE2E = require('../fixtures/usermanager/usermanager_user_dorothea.json'); - -export function initUsermanagerUsers(users: UsermanagerUserE2E[]) { - initUsermanagerData(users); -} - export function getUserSabine(): UserE2E { - return sabineFixture; + return withIdsFromCypressEnv(sabineFixture); } export function getUserDorothea(): UserE2E { - return dorotheaFixture; -} - -export function getUserManagerUserSabine(): UsermanagerUserE2E { - return withIdsFromCypressEnv(userManagerSabineFixture); -} - -export function getUserManagerUserPeter(): UsermanagerUserE2E { - return withIdsFromCypressEnv(userManagerPeterFixture); + return withIdsFromCypressEnv(dorotheaFixture); } -export function getUserManagerUserEmil(): UsermanagerUserE2E { - return withIdsFromCypressEnv(userManagerEmilFixture); -} - -export function getUserManagerUserDorothea(): UsermanagerUserE2E { - return withIdsFromCypressEnv(userManagerDorotheaFixture); -} - -export function getUserSabineInternalId(): string { - return getUserManagerUserSabine()._id.$oid; -} - -function withIdsFromCypressEnv(user: UsermanagerUserE2E): UsermanagerUserE2E { - user._id = { $oid: getUserInternalIdFromCypressEnv(user.username) }; - user.keycloakUserId = getKeycloakUserIdFromCypressEnv(user.username); +function withIdsFromCypressEnv(user: UserE2E): UserE2E { + user.id = getUserInternalIdFromCypressEnv(user.name); return user; } @@ -75,10 +44,6 @@ function getUserInternalIdFromCypressEnv(username: string): string { return getCypressEnv(`${username}InternalId`); } -function getKeycloakUserIdFromCypressEnv(username: string): string { - return getCypressEnv(`${username}Uuid`); -} - enum DatabaseUser { EMIL = 'user-ea/user_emil.json', KFINDER = 'user-main/user_kfinder.json', diff --git a/alfa-client/apps/alfa-e2e/src/support/wiedervorlage-util.ts b/alfa-client/apps/alfa-e2e/src/support/wiedervorlage-util.ts index 49ee58d9d1445a9130298d83d5dddc88c58b4e6a..4517415473bde77a192dcfd72d3e766144f3caad 100644 --- a/alfa-client/apps/alfa-e2e/src/support/wiedervorlage-util.ts +++ b/alfa-client/apps/alfa-e2e/src/support/wiedervorlage-util.ts @@ -27,7 +27,7 @@ import { WiedervorlageE2E } from '../model/wiedervorlage'; import { buildUrl } from './tech.util'; import { VORGANG_ATTACHED_ITEM_CLASS } from './vorgang-attached-item-util'; import { createVorgangUriById } from './vorgang-util'; -import { getUserSabineInternalId } from './user-util'; +import { getUserSabine } from './user-util'; /** @deprecated */ const wiedervorlageFixture: WiedervorlageE2E = require('../fixtures/wiedervorlage/wiedervorlage.json'); @@ -58,7 +58,7 @@ const wiedervorlageItemFixture: WiedervorlageE2E = require('../fixtures/wiedervo //TODO rename to createWiedervorlage if deprecated function removed export function createWiedervorlageItem(betreff: string): WiedervorlageE2E { - return { ...wiedervorlageItemFixture, betreff, createdBy: getUserSabineInternalId() }; + return { ...wiedervorlageItemFixture, betreff, createdBy: getUserSabine().id }; } export function createWiedervorlageAttachedItem(_id: string, vorgangId: string): VorgangAttachedItemE2E {