From 7c3f011e8404b678de20adc4d75a61d756bf3a8c Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 13 Feb 2025 20:09:58 -0800 Subject: [PATCH] Couple more test fixes --- .../app/components/admin/settings/settings.component.spec.ts | 3 +++ src-ui/src/app/components/admin/tasks/tasks.component.spec.ts | 2 +- src-ui/src/app/data/paperless-task.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src-ui/src/app/components/admin/settings/settings.component.spec.ts b/src-ui/src/app/components/admin/settings/settings.component.spec.ts index 4f50e7453..3ab7f250b 100644 --- a/src-ui/src/app/components/admin/settings/settings.component.spec.ts +++ b/src-ui/src/app/components/admin/settings/settings.component.spec.ts @@ -309,6 +309,9 @@ describe('SettingsComponent', () => { classifier_status: SystemStatusItemStatus.OK, classifier_last_trained: new Date().toISOString(), classifier_error: null, + sanity_check_status: SystemStatusItemStatus.ERROR, + sanity_check_last_run: new Date().toISOString(), + sanity_check_error: 'Error running sanity check.', }, } jest.spyOn(systemStatusService, 'get').mockReturnValue(of(status)) diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts index a0a6f9ea0..5aa53052a 100644 --- a/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts +++ b/src-ui/src/app/components/admin/tasks/tasks.component.spec.ts @@ -155,7 +155,7 @@ describe('TasksComponent', () => { jest.useFakeTimers() fixture.detectChanges() httpTestingController - .expectOne(`${environment.apiBaseUrl}tasks/`) + .expectOne(`${environment.apiBaseUrl}tasks/?type=file`) .flush(tasks) }) diff --git a/src-ui/src/app/data/paperless-task.ts b/src-ui/src/app/data/paperless-task.ts index d15f006d7..5b2003704 100644 --- a/src-ui/src/app/data/paperless-task.ts +++ b/src-ui/src/app/data/paperless-task.ts @@ -1,8 +1,9 @@ import { ObjectWithId } from './object-with-id' export enum PaperlessTaskType { - // just file tasks, for now File = 'file', + ScheduledTask = 'scheduled_task', + ManualTask = 'manual_task', } export enum PaperlessTaskStatus {