From eaa9781e129374686c784b43a4b9d4bdecdb993e Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Thu, 17 Oct 2024 11:37:03 +0200 Subject: [PATCH] update specs to use the class syntax for quarters --- .../keyresult-dialog/keyresult-dialog.component.spec.ts | 3 ++- .../quarter-filter/quarter-filter.component.spec.ts | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.spec.ts b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.spec.ts index 17d9f4d017..bf74d658ce 100644 --- a/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.spec.ts +++ b/frontend/src/app/components/keyresult-dialog/keyresult-dialog.component.spec.ts @@ -24,6 +24,7 @@ import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DragDropModule } from '@angular/cdk/drag-drop'; import { UserService } from '../../services/user.service'; import { KeyResultFormComponent } from '../key-result-form/key-result-form.component'; +import { Quarter } from '../../shared/types/model/Quarter'; describe('KeyresultDialogComponent', () => { let component: KeyresultDialogComponent; @@ -55,7 +56,7 @@ describe('KeyresultDialogComponent', () => { let keyResultObjective: KeyResultObjective = { id: 2, state: State.ONGOING, - quarter: { id: 1, label: 'GJ 22/23-Q2', endDate: new Date(), startDate: new Date() }, + quarter: new Quarter(1, 'GJ 22/23-Q2', new Date(), new Date()), }; let fullKeyResultMetric = { diff --git a/frontend/src/app/components/quarter-filter/quarter-filter.component.spec.ts b/frontend/src/app/components/quarter-filter/quarter-filter.component.spec.ts index bedb9bc652..b81c7056e9 100644 --- a/frontend/src/app/components/quarter-filter/quarter-filter.component.spec.ts +++ b/frontend/src/app/components/quarter-filter/quarter-filter.component.spec.ts @@ -21,10 +21,10 @@ const overviewService = { }; const quarters = [ - { id: 999, label: 'Backlog', startDate: null, endDate: null }, - { ...quarter, id: 2 }, - { ...quarter, id: 5 }, - { ...quarter, id: 7 }, + new Quarter(999, 'Backlog', null, null), + new Quarter(2, '23.02.2025', new Date(), new Date()), + new Quarter(5, '23.02.2025', new Date(), new Date()), + new Quarter(7, '23.02.2025', new Date(), new Date()), ]; const quarterService = {