From dbfc0f64c7a354de55a015f4a7052702585ad300 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 24 Dec 2024 10:17:39 +0100 Subject: [PATCH] fix after rebase --- .../keyresult-type.component.spec.ts | 0 .../src/app/interceptors/oauth.interceptor.spec.ts | 0 frontend/src/app/interceptors/oauth.interceptor.ts | 0 .../objective-menu-actions.service.spec.ts | 14 +++++--------- .../example-dialog/example-dialog.component.html | 0 .../example-dialog.component.spec.ts | 0 .../example-dialog/example-dialog.component.ts | 0 frontend/src/app/shared/shared.module.ts | 3 --- .../member-list-table.component.spec.ts | 6 +++--- 9 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 frontend/src/app/components/keyresult-type/keyresult-type.component.spec.ts delete mode 100644 frontend/src/app/interceptors/oauth.interceptor.spec.ts delete mode 100644 frontend/src/app/interceptors/oauth.interceptor.ts delete mode 100644 frontend/src/app/shared/dialog/example-dialog/example-dialog.component.html delete mode 100644 frontend/src/app/shared/dialog/example-dialog/example-dialog.component.spec.ts delete mode 100644 frontend/src/app/shared/dialog/example-dialog/example-dialog.component.ts diff --git a/frontend/src/app/components/keyresult-type/keyresult-type.component.spec.ts b/frontend/src/app/components/keyresult-type/keyresult-type.component.spec.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/interceptors/oauth.interceptor.spec.ts b/frontend/src/app/interceptors/oauth.interceptor.spec.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/interceptors/oauth.interceptor.ts b/frontend/src/app/interceptors/oauth.interceptor.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/services/objective-menu-actions.service.spec.ts b/frontend/src/app/services/objective-menu-actions.service.spec.ts index 1444464037..70b57d8dcf 100644 --- a/frontend/src/app/services/objective-menu-actions.service.spec.ts +++ b/frontend/src/app/services/objective-menu-actions.service.spec.ts @@ -28,17 +28,17 @@ describe('ObjectiveMenuActionsService', () => { specificMenuEntriesSpy = jest.spyOn(service as any, 'getSpecificMenuEntries'); }); - afterEach(() => { - expect(specificMenuEntriesSpy) - .toHaveBeenCalledTimes(1); - }); - it('should be created', () => { expect(service) .toBeTruthy(); }); describe('getMenu', () => { + afterEach(() => { + expect(specificMenuEntriesSpy) + .toHaveBeenCalledTimes(1); + }); + it('should return default and specific menu entries for an ongoing objective', () => { const spyOn = jest.spyOn(service as any, 'getOngoingMenuActions'); @@ -78,10 +78,6 @@ describe('ObjectiveMenuActionsService', () => { expect(spyOn) .toHaveBeenCalledTimes(1); }); - afterEach(() => { - expect(specificMenuEntriesSpy) - .toHaveBeenCalledTimes(1); - }); }); describe('get correct release action', () => { diff --git a/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.html b/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.html deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.spec.ts b/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.spec.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.ts b/frontend/src/app/shared/dialog/example-dialog/example-dialog.component.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/frontend/src/app/shared/shared.module.ts b/frontend/src/app/shared/shared.module.ts index 41075817f1..4d457d5358 100644 --- a/frontend/src/app/shared/shared.module.ts +++ b/frontend/src/app/shared/shared.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { CommonModule, NgOptimizedImage } from '@angular/common'; -import { ExampleDialogComponent } from './dialog/example-dialog/example-dialog.component'; import { ObjectiveFormComponent } from './dialog/objective-dialog/objective-form.component'; import { ConfirmDialogComponent } from './dialog/confirm-dialog/confirm-dialog.component'; import { ScoringComponent } from './custom/scoring/scoring.component'; @@ -28,7 +27,6 @@ import { MatTooltip } from '@angular/material/tooltip'; @NgModule({ declarations: [ - ExampleDialogComponent, ObjectiveFormComponent, ConfirmDialogComponent, UnitTransformationPipe, @@ -62,7 +60,6 @@ import { MatTooltip } from '@angular/material/tooltip'; MatTooltip ], exports: [ - ExampleDialogComponent, ObjectiveFormComponent, ConfirmDialogComponent, ScoringComponent, diff --git a/frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.spec.ts b/frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.spec.ts index c3612cc844..6c00e9edd6 100644 --- a/frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.spec.ts +++ b/frontend/src/app/team-management/member-list/member-list-table/member-list-table.component.spec.ts @@ -123,13 +123,13 @@ describe('MemberListTableComponent', () => { tick(); expect(teamServiceMock.removeUserFromTeam) - .toHaveBeenCalledWith(1); + .toHaveBeenCalledTimes(1); expect(teamServiceMock.removeUserFromTeam) .toHaveBeenCalledWith(entry.id, component.selectedTeam$.value); expect(userServiceMock.reloadUsers) - .toHaveBeenCalledWith(1); + .toHaveBeenCalledTimes(1); expect(userServiceMock.reloadCurrentUser) - .toHaveBeenCalledWith(1); + .toHaveBeenCalledTimes(1); })); it('removeMemberFromTeam should not call removeUserFromTeam and reloadUsers if not confirmed', fakeAsync(() => {