From ceb9daa96cc0e96d68ae026f7e91ef6a085af22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Obernd=C3=B6rfer?= Date: Thu, 5 Dec 2024 13:02:41 +0100 Subject: [PATCH] Fixed tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Florian Oberndörfer --- .../notification-settings.component.spec.ts | 6 +++--- .../notification-settings.component.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.spec.ts b/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.spec.ts index eff61e4..3a44eca 100644 --- a/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.spec.ts +++ b/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.spec.ts @@ -1,10 +1,8 @@ -import { describe, it, expect, beforeEach, vi } from 'vitest'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; import { FormBuilder } from '@angular/forms'; import { of, throwError } from 'rxjs'; import { NotificationSettingsComponent } from './notification-settings.component'; -import { NotificationService } from '../../../services/notification.service'; -import { mock } from 'node:test'; describe('NotificationSettingsComponent', () => { let component: NotificationSettingsComponent; @@ -16,6 +14,7 @@ describe('NotificationSettingsComponent', () => { getAllAlerts: ReturnType; refreshAlerts: ReturnType; getRefreshObservable: ReturnType; + refresh: ReturnType; }; let mockFormBuilder: FormBuilder; @@ -38,6 +37,7 @@ describe('NotificationSettingsComponent', () => { getAllAlerts: vi.fn(), refreshAlerts: vi.fn(), getRefreshObservable: vi.fn(), + refresh: vi.fn(), }; mockFormBuilder = new FormBuilder(); diff --git a/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.ts b/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.ts index 2aea382..0e34694 100644 --- a/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.ts +++ b/apps/frontend/src/app/management/components/settings/notification-settings/notification-settings.component.ts @@ -1,16 +1,16 @@ -import { Component, OnDestroy } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; import { FormArray, FormBuilder, FormGroup } from '@angular/forms'; import { BehaviorSubject, forkJoin, Subject, takeUntil } from 'rxjs'; import { NotificationService } from '../../../services/notification.service'; -import { AlertType } from 'apps/frontend/src/app/shared/types/alertType'; -import { AlertServiceService } from 'apps/frontend/src/app/alert/service/alert-service.service'; +import { AlertType } from '../../../../shared/types/alertType'; +import { AlertServiceService } from '../../../../alert/service/alert-service.service'; @Component({ selector: 'app-notification-settings', templateUrl: './notification-settings.component.html', styleUrl: './notification-settings.component.css', }) -export class NotificationSettingsComponent implements OnDestroy { +export class NotificationSettingsComponent implements OnDestroy, OnInit { isLoading = false; isSaving = false; isOpen = false;