From 56e2286c000ef8aba850def0eeb29fadf9d87d63 Mon Sep 17 00:00:00 2001 From: OZGCloud <ozgcloud@mgm-tp.com> Date: Mon, 12 Aug 2024 09:28:35 +0200 Subject: [PATCH] OZG-6302 rename anfrageFormular - requestForm --- .../src/lib/collaboration.service.spec.ts | 24 ++++++++--------- .../src/lib/collaboration.service.ts | 14 +++++----- ...ration-in-vorgang-container.component.html | 6 ++--- ...ion-in-vorgang-container.component.spec.ts | 26 +++++++++---------- ...boration-in-vorgang-container.component.ts | 12 ++++----- ...aboration-request-container.component.html | 2 +- ...ration-request-container.component.spec.ts | 4 +-- ...llaboration-request-container.component.ts | 2 +- 8 files changed, 45 insertions(+), 45 deletions(-) diff --git a/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.spec.ts b/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.spec.ts index c2bba9767d..e0e2979bbb 100644 --- a/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.spec.ts +++ b/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.spec.ts @@ -7,36 +7,36 @@ describe('CollaborationService', () => { service = new CollaborationService(); }); - describe('is anfrage formular visible', () => { + describe('is request form visible', () => { it('should return value', (done) => { - service.showAnfrageFormular$.next(false); + service.showRequestForm$.next(false); - service.isAnfrageFormularVisible().subscribe((isVisible: boolean) => { + service.isRequestFormVisible().subscribe((isVisible: boolean) => { expect(isVisible).toBeTruthy(); done(); }); - service.showAnfrageFormular(); + service.showRequestForm(); }); }); describe('show anfrage formular', () => { - it('should set "showAnfrageFormular" to true', () => { - service.showAnfrageFormular$.next(false); + it('should set "showRequestForm" to true', () => { + service.showRequestForm$.next(false); - service.showAnfrageFormular(); + service.showRequestForm(); - expect(service.showAnfrageFormular$.value).toBeTruthy(); + expect(service.showRequestForm$.value).toBeTruthy(); }); }); describe('hide anfrage formular', () => { - it('should set "showAnfrageFormular" to false', () => { - service.showAnfrageFormular$.next(true); + it('should set "showRequestForm" to false', () => { + service.showRequestForm$.next(true); - service.hideAnfrageFormular(); + service.hideRequestForm(); - expect(service.showAnfrageFormular$.value).toBeFalsy(); + expect(service.showRequestForm$.value).toBeFalsy(); }); }); }); diff --git a/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.ts b/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.ts index 53b3473962..825e329acd 100644 --- a/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.ts +++ b/alfa-client/libs/collaboration-shared/src/lib/collaboration.service.ts @@ -3,17 +3,17 @@ import { BehaviorSubject, Observable } from 'rxjs'; @Injectable() export class CollaborationService { - showAnfrageFormular$: BehaviorSubject<boolean> = new BehaviorSubject(false); + showRequestForm$: BehaviorSubject<boolean> = new BehaviorSubject(false); - public isAnfrageFormularVisible(): Observable<boolean> { - return this.showAnfrageFormular$.asObservable(); + public isRequestFormVisible(): Observable<boolean> { + return this.showRequestForm$.asObservable(); } - public showAnfrageFormular(): void { - this.showAnfrageFormular$.next(true); + public showRequestForm(): void { + this.showRequestForm$.next(true); } - public hideAnfrageFormular(): void { - this.showAnfrageFormular$.next(false); + public hideRequestForm(): void { + this.showRequestForm$.next(false); } } diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.html b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.html index 39dfc52907..0ddd331df0 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.html +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.html @@ -3,15 +3,15 @@ variant="outline" text="Anfrage erstellen" data-test-id="anfrage-erstellen-button" - (clickEmitter)="showAnfrageFormular()" + (clickEmitter)="showRequestForm()" > <ods-collaboration-icon icon /> </ods-button> </ng-template> -<ng-container *ngIf="isAnfrageFormularVisible$ | async; else anfrageErstellenButton"> +<ng-container *ngIf="isRequestFormVisible$ | async; else anfrageErstellenButton"> <alfa-collaboration-request-container data-test-id="collaboration-request-container" - (hideFormular)="hideFormular()" + (hideRequestForm)="hideRequestForm()" ></alfa-collaboration-request-container> </ng-container> diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.spec.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.spec.ts index bd9c6d84c7..593d18bad6 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.spec.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.spec.ts @@ -23,7 +23,7 @@ describe('CollaborationInVorgangContainerComponent', () => { const service: Mock<CollaborationService> = { ...mock(CollaborationService), - isAnfrageFormularVisible: jest.fn().mockReturnValue(of(false)), + isRequestFormVisible: jest.fn().mockReturnValue(of(false)), }; beforeEach(async () => { @@ -55,14 +55,14 @@ describe('CollaborationInVorgangContainerComponent', () => { it('should call service', () => { component.ngOnInit(); - expect(service.isAnfrageFormularVisible).toHaveBeenCalled(); + expect(service.isRequestFormVisible).toHaveBeenCalled(); }); }); describe('anfrage erstellen button', () => { - describe('on anfrage formular visibility false', () => { + describe('on request form visibility false', () => { beforeEach(() => { - component.isAnfrageFormularVisible$ = of(false); + component.isRequestFormVisible$ = of(false); }); it('should be shown', () => { @@ -76,12 +76,12 @@ describe('CollaborationInVorgangContainerComponent', () => { dispatchEventFromFixture(fixture, anfrageErstellenButton, 'clickEmitter'); - expect(service.showAnfrageFormular).toHaveBeenCalled(); + expect(service.showRequestForm).toHaveBeenCalled(); }); }); - it('should be hidden if formular visibility is true', () => { - component.isAnfrageFormularVisible$ = of(true); + it('should be hidden if request form visibility is true', () => { + component.isRequestFormVisible$ = of(true); fixture.detectChanges(); @@ -90,9 +90,9 @@ describe('CollaborationInVorgangContainerComponent', () => { }); describe('zustaendige stelle', () => { - describe('on anfrage formular visibility true', () => { + describe('on request form visibility true', () => { beforeEach(() => { - component.isAnfrageFormularVisible$ = of(true); + component.isRequestFormVisible$ = of(true); }); it('should be shown', () => { fixture.detectChanges(); @@ -103,14 +103,14 @@ describe('CollaborationInVorgangContainerComponent', () => { it('should call service on hideFormular output', () => { fixture.detectChanges(); - dispatchEventFromFixture(fixture, collaborationRequestContainer, 'hideFormular'); + dispatchEventFromFixture(fixture, collaborationRequestContainer, 'hideRequestForm'); - expect(service.hideAnfrageFormular).toHaveBeenCalled(); + expect(service.hideRequestForm).toHaveBeenCalled(); }); }); - it('should be hidden if formular visibility is false', () => { - component.isAnfrageFormularVisible$ = of(false); + it('should be hidden if request form visibility is false', () => { + component.isRequestFormVisible$ = of(false); fixture.detectChanges(); diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.ts index c3c14cebfc..a3f82c8ae4 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-in-vorgang-container.component.ts @@ -7,19 +7,19 @@ import { Observable } from 'rxjs'; templateUrl: './collaboration-in-vorgang-container.component.html', }) export class CollaborationInVorgangContainerComponent implements OnInit { - public isAnfrageFormularVisible$: Observable<boolean>; + public isRequestFormVisible$: Observable<boolean>; constructor(private service: CollaborationService) {} ngOnInit(): void { - this.isAnfrageFormularVisible$ = this.service.isAnfrageFormularVisible(); + this.isRequestFormVisible$ = this.service.isRequestFormVisible(); } - public showAnfrageFormular(): void { - this.service.showAnfrageFormular(); + public showRequestForm(): void { + this.service.showRequestForm(); } - public hideFormular(): void { - this.service.hideAnfrageFormular(); + public hideRequestForm(): void { + this.service.hideRequestForm(); } } diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.html b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.html index 8ab9513720..0f52756302 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.html +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.html @@ -16,7 +16,7 @@ variant="outline" text="Abbrechen" data-test-id="collaboration-request-abbrechen-button" - (clickEmitter)="hideFormular.emit()" + (clickEmitter)="hideRequestForm.emit()" > <ods-close-icon icon class="fill-primary"></ods-close-icon> </ods-button> diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.spec.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.spec.ts index df86804749..ab1e1c2be5 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.spec.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.spec.ts @@ -34,8 +34,8 @@ describe('CollaborationRequestContainerComponent', () => { }); describe('abbrechen button', () => { - it('should emit hideFormular', () => { - const emitSpy = (component.hideFormular.emit = jest.fn()); + it('should emit hideRequestForm', () => { + const emitSpy = (component.hideRequestForm.emit = jest.fn()); dispatchEventFromFixture(fixture, abbrechenButton, 'clickEmitter'); diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.ts index 2c246804f7..e8fa92a4cc 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-request-container/collaboration-request-container.component.ts @@ -5,5 +5,5 @@ import { Component, EventEmitter, Output } from '@angular/core'; templateUrl: './collaboration-request-container.component.html', }) export class CollaborationRequestContainerComponent { - @Output() public hideFormular: EventEmitter<void> = new EventEmitter<void>(); + @Output() public hideRequestForm: EventEmitter<void> = new EventEmitter<void>(); } -- GitLab