From b4ec43eab1912fc4e61de2322d3c88c3bf75a109 Mon Sep 17 00:00:00 2001
From: Alexander Reifschneider <alexander.reifschneider@mgm-tp.com>
Date: Thu, 15 May 2025 11:21:48 +0200
Subject: [PATCH] OZG-7971 improve quality (mr comments)

---
 ...abschliessen-dialog-container.component.spec.ts | 14 +++++++++++++-
 ...ection-timeout-retry-fail-dialog.component.html |  2 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/alfa-client/libs/bescheid/src/lib/bescheid-wizard-container/bescheid-wizard/antrag-bescheiden/abschliessen-dialog-container/bescheid-wizard-abschliessen-dialog-container.component.spec.ts b/alfa-client/libs/bescheid/src/lib/bescheid-wizard-container/bescheid-wizard/antrag-bescheiden/abschliessen-dialog-container/bescheid-wizard-abschliessen-dialog-container.component.spec.ts
index d87c8f9311..16a5ddb46c 100644
--- a/alfa-client/libs/bescheid/src/lib/bescheid-wizard-container/bescheid-wizard/antrag-bescheiden/abschliessen-dialog-container/bescheid-wizard-abschliessen-dialog-container.component.spec.ts
+++ b/alfa-client/libs/bescheid/src/lib/bescheid-wizard-container/bescheid-wizard/antrag-bescheiden/abschliessen-dialog-container/bescheid-wizard-abschliessen-dialog-container.component.spec.ts
@@ -24,7 +24,7 @@
 import { BescheidResource, BescheidService } from '@alfa-client/bescheid-shared';
 import { CommandResource } from '@alfa-client/command-shared';
 import { StateResource } from '@alfa-client/tech-shared';
-import { createDialogRefMock, DialogRefMock, mock, Mock, triggerEvent } from '@alfa-client/test-utils';
+import { createDialogRefMock, DialogRefMock, getMockComponent, mock, Mock, triggerEvent } from '@alfa-client/test-utils';
 import { createDialogResult } from '@alfa-client/ui-shared';
 import { VorgangWithEingangResource } from '@alfa-client/vorgang-shared';
 import { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';
@@ -149,6 +149,18 @@ describe('BescheidWizardAbschliessenDialogContainerComponent', () => {
     });
 
     describe('überspringen und abschließen button', () => {
+      describe('input', () => {
+        it('should set stateResource', () => {
+          const commandStateResource: StateResource<CommandResource> = createSuccessfullyDoneCommandStateResource();
+          component.abschliessen$ = of(commandStateResource);
+          const mockButton: ButtonWithSpinnerComponent = getMockComponent(fixture, ButtonWithSpinnerComponent);
+
+          fixture.detectChanges();
+
+          expect(mockButton._stateResource).toBe(commandStateResource);
+        });
+      });
+
       describe('output', () => {
         it('should call onConfirm', () => {
           component.onConfirm = jest.fn();
diff --git a/alfa-client/libs/ui/src/lib/ui/http-error-dialog/connection-timeout-retry-fail-dialog/connection-timeout-retry-fail-dialog.component.html b/alfa-client/libs/ui/src/lib/ui/http-error-dialog/connection-timeout-retry-fail-dialog/connection-timeout-retry-fail-dialog.component.html
index fba7d7e56d..ad25d06e9f 100644
--- a/alfa-client/libs/ui/src/lib/ui/http-error-dialog/connection-timeout-retry-fail-dialog/connection-timeout-retry-fail-dialog.component.html
+++ b/alfa-client/libs/ui/src/lib/ui/http-error-dialog/connection-timeout-retry-fail-dialog/connection-timeout-retry-fail-dialog.component.html
@@ -33,7 +33,7 @@
       Auch nach weiteren Versuchen konnte keine Verbindung aufgebaut werden. <br />
       Bitte wenden Sie sich an Ihren Administrator.
     </p>
-    <ods-button class="mt-4" variant="outline" text="Reload" dataTestId="reload-button" (click)="reload()">
+    <ods-button class="mt-4" variant="outline" text="Reload" dataTestId="reload-button" (clickEmitter)="reload()">
       <ods-icon icon name="refresh" />
     </ods-button>
   </mat-dialog-content>
-- 
GitLab