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 c2bba9767d3e462c61654d60fcf62aba9259db3b..e0e2979bbb5773ae0ac729f4f48272bd9071f261 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 53b34739626565c124b3578c5f4b519cefc7bbef..825e329acd0761272b43e287cf94cfa94b3bb93b 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 39dfc5290794b3e9c6721a490fa17456409599a9..0ddd331df0d55bd3167f46812a17d9dcb095b8e3 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 bd9c6d84c7516a00fa00a733b4c22707dad49c4c..593d18bad6ba4e3a51e2a0e2754add4a994121bd 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 c3c14cebfca8473ac116bc1a76f548c4c2748132..a3f82c8ae46118a9e50407cb6ec43c3eb22560f5 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 8ab95137208e3462eaaafab98d954db5fa3ffe21..0f5275630246276c2d7329c9db71a3768948570a 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 df868047496b7e584a886392c7b87d01c9695c0c..ab1e1c2be5eb45bfcb44e60ca0d7f2ed00e361aa 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 2c246804f7c29c47099c0f628d34c4b489172cc5..e8fa92a4ccb8f6745c556cce327ba4735f87e655 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>(); }