Files
paperless-ngx/src-ui/src/app/utils/document-operation.spec.ts
T
5f6a071d36 Feature: OCR Templates (#14507)
---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Christoph Schlaepfer <1939311+Anuril@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: stumpylog <797416+stumpylog@users.noreply.github.com>
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
2026-11-26 14:27:46 -08:00

19 lines
734 B
TypeScript

import {
documentOperationHasFollowUpTasks,
getDocumentOperationLabel,
} from './document-operation'
describe('Document Operation Utils', () => {
it('names zone OCR and treats task completion as finished extraction', () => {
expect(getDocumentOperationLabel('run_zone_ocr')).toBe('Run zone OCR')
expect(documentOperationHasFollowUpTasks('run_zone_ocr')).toBe(false)
})
it('should retrieve the document operation label correctly for an existing operation, null otherwise', () => {
const result = getDocumentOperationLabel('modify_custom_fields')
expect(result).toBe('Update custom fields')
const resultNull = getDocumentOperationLabel('non_existing_operation')
expect(resultNull).toBeNull()
})
})