Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Oberndörfer <[email protected]>
  • Loading branch information
flo0852 committed Dec 5, 2024
1 parent 5f30197 commit ceb9daa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -16,6 +14,7 @@ describe('NotificationSettingsComponent', () => {
getAllAlerts: ReturnType<typeof vi.fn>;
refreshAlerts: ReturnType<typeof vi.fn>;
getRefreshObservable: ReturnType<typeof vi.fn>;
refresh: ReturnType<typeof vi.fn>;
};
let mockFormBuilder: FormBuilder;

Expand All @@ -38,6 +37,7 @@ describe('NotificationSettingsComponent', () => {
getAllAlerts: vi.fn(),
refreshAlerts: vi.fn(),
getRefreshObservable: vi.fn(),
refresh: vi.fn(),
};

mockFormBuilder = new FormBuilder();
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit ceb9daa

Please sign in to comment.