From 6f937d8b24f0265644925d2e24a5e7e160903c4b Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Thu, 14 Nov 2024 14:51:43 +0100
Subject: [PATCH] OZG-4310 small fix

---
 alfa-client/apps/admin/src/app/app.component.spec.ts      | 8 ++++----
 alfa-client/apps/admin/src/app/app.component.ts           | 4 ++--
 .../organisationseinheit-form.component.spec.ts           | 2 --
 .../postfach-form/postfach-form.component.spec.ts         | 8 +-------
 4 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/alfa-client/apps/admin/src/app/app.component.spec.ts b/alfa-client/apps/admin/src/app/app.component.spec.ts
index f0849bfe3e..6388a21f39 100644
--- a/alfa-client/apps/admin/src/app/app.component.spec.ts
+++ b/alfa-client/apps/admin/src/app/app.component.spec.ts
@@ -131,17 +131,17 @@ describe('AppComponent', () => {
       });
 
       it('should call removeAuthenticationParams', () => {
-        component.removeAuthenticationParams = jest.fn();
+        component.forwardWithoutAuthenticationParams = jest.fn();
 
         component.doAfterLoggedIn();
 
-        expect(component.removeAuthenticationParams).toHaveBeenCalled();
+        expect(component.forwardWithoutAuthenticationParams).toHaveBeenCalled();
       });
     });
 
-    describe('removeAuthenticationParams', () => {
+    describe('forward without authentication params', () => {
       it('should navigate to same route without authentication params', () => {
-        component.removeAuthenticationParams();
+        component.forwardWithoutAuthenticationParams();
 
         expect(router.navigate).toHaveBeenCalledWith([], { queryParams: {} });
       });
diff --git a/alfa-client/apps/admin/src/app/app.component.ts b/alfa-client/apps/admin/src/app/app.component.ts
index 48bd89bfa5..e1d4c6d2a4 100644
--- a/alfa-client/apps/admin/src/app/app.component.ts
+++ b/alfa-client/apps/admin/src/app/app.component.ts
@@ -28,10 +28,10 @@ export class AppComponent implements OnInit {
 
   doAfterLoggedIn(): void {
     this.apiRootStateResource$ = this.apiRootService.getApiRoot();
-    this.removeAuthenticationParams();
+    this.forwardWithoutAuthenticationParams();
   }
 
-  removeAuthenticationParams() {
+  forwardWithoutAuthenticationParams() {
     const queryParams = this.getQueryParamsWithoutAuthentication();
     this.router.navigate([], { queryParams });
   }
diff --git a/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-form-container/organisationseinheit-form/organisationseinheit-form.component.spec.ts b/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-form-container/organisationseinheit-form/organisationseinheit-form.component.spec.ts
index ad4f7bd11d..86d331e417 100644
--- a/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-form-container/organisationseinheit-form/organisationseinheit-form.component.spec.ts
+++ b/alfa-client/libs/admin/settings/src/lib/organisationseinheit/organisationseinheit-form-container/organisationseinheit-form/organisationseinheit-form.component.spec.ts
@@ -9,7 +9,6 @@ import { MockComponent } from 'ng-mocks';
 import { of } from 'rxjs';
 import { createInvalidParam, createProblemDetail } from '../../../../../../../tech-shared/test/error';
 import { createAdminOrganisationsEinheitResource } from '../../../../../test/organisations-einheit/organisations-einheit';
-import { TextFieldComponent } from '../../../shared/text-field/text-field.component';
 import { OrganisationsEinheitService } from '../../organisationseinheit.service';
 import { OrganisationsEinheitFormComponent } from './organisationseinheit-form.component';
 import { OrganisationsEinheitSignaturComponent } from './organisationseinheit-signatur/organisationseinheit-signatur.component';
@@ -31,7 +30,6 @@ describe('OrganisationsEinheitFormComponent', () => {
     await TestBed.configureTestingModule({
       declarations: [
         OrganisationsEinheitFormComponent,
-        MockComponent(TextFieldComponent),
         MockComponent(OrganisationsEinheitSignaturComponent),
         MockComponent(ButtonWithSpinnerComponent),
       ],
diff --git a/alfa-client/libs/admin/settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts b/alfa-client/libs/admin/settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts
index 8c8096d7df..119bf30d3e 100644
--- a/alfa-client/libs/admin/settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts
+++ b/alfa-client/libs/admin/settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.spec.ts
@@ -9,7 +9,6 @@ import { singleCold } from 'libs/tech-shared/test/marbles';
 import { MockComponent } from 'ng-mocks';
 import { EMPTY } from 'rxjs';
 import { createPostfachResource } from '../../../../../test/postfach/postfach';
-import { TextFieldComponent } from '../../../shared/text-field/text-field.component';
 import { PostfachResource } from '../../postfach.model';
 import { PostfachService } from '../../postfach.service';
 import { PostfachFormComponent } from './postfach-form.component';
@@ -28,12 +27,7 @@ describe('PostfachFormComponent', () => {
 
   beforeEach(async () => {
     await TestBed.configureTestingModule({
-      declarations: [
-        PostfachFormComponent,
-        MockComponent(TextFieldComponent),
-        MockComponent(PostfachSignaturComponent),
-        MockComponent(ButtonWithSpinnerComponent),
-      ],
+      declarations: [PostfachFormComponent, MockComponent(PostfachSignaturComponent), MockComponent(ButtonWithSpinnerComponent)],
       imports: [ReactiveFormsModule, FormsModule],
       providers: [
         {
-- 
GitLab