Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions tests/e2e/case-documents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ test.describe('Case detail — the Documents tab', () => {
await api.dispose()
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-011-the-case-page-must-list-the-dossier-in-a-documents-tab
// @e2e exclude No canonical scenario covers the Documents tab and its six columns.
// REQ-ZAK-011 "Documents visible on the case" governs it and lives in the open
// change documents-on-the-case; canonical REQ-ZAK-004a describes the older
// grouped dossier view, which is a different surface. Citable once that change
// archives; blocked until then by ConductionNL/.github#730.
test('the tab lists this case documents with all six columns', async ({
page,
}) => {
Expand Down Expand Up @@ -430,7 +434,10 @@ test.describe('Case detail — the Documents tab', () => {
await expect(panel.getByText(TAGGED_TITLE)).toHaveCount(0)
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-011-the-case-page-must-list-the-dossier-in-a-documents-tab
// @e2e exclude No canonical scenario covers the pairing of the Documents tab to
// the panel the dossier renders in. REQ-ZAK-011 "Documents visible on the case"
// in the open change documents-on-the-case is the governing one; the manifest
// half is pinned by tests/vitest/caseDocumentsTab.spec.js.
test('the Documents tab owns the panel the dossier renders in', async ({
page,
}) => {
Expand Down Expand Up @@ -480,7 +487,7 @@ test.describe('Case detail — the Documents tab', () => {
).toBeVisible({ timeout: 20_000 })
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-011-the-case-page-must-list-the-dossier-in-a-documents-tab
// @e2e openspec/specs/document-zaakdossier/spec.md#scenario-req-zak-004b-empty-dossier-shows-upload-cta-with-drag-and-drop-zone
test('a case without documents says so and still offers upload', async ({
page,
}) => {
Expand Down Expand Up @@ -514,8 +521,11 @@ test.describe('Case detail — the Documents tab', () => {
).toBe(true)
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-011-the-case-page-must-list-the-dossier-in-a-documents-tab
// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-013-an-informatieobject-must-carry-a-direction
// @e2e exclude No canonical scenario covers filing a dropped file on the case
// with its type and direction. REQ-ZAK-011 "Drop a file onto the tab" and
// REQ-ZAK-013 "Direction chosen on upload" govern it and live in the open change
// documents-on-the-case; canonical REQ-ZAK-005a asserts the dialog opening for a
// two-file drop, not the saved type, direction and case link this proves.
test('a dropped file is filed on the case with its type and direction', async ({
page,
}) => {
Expand Down Expand Up @@ -556,7 +566,9 @@ test.describe('Case detail — the Documents tab', () => {
expect(String(join.case)).toBe(dropCaseId)
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-012-an-informatieobject-must-carry-keywords-you-can-filter-on
// @e2e exclude Keywords are not in the canonical spec. REQ-ZAK-012 "Tag a
// document on upload" governs this and lives in the open change
// documents-on-the-case.
test('keywords typed on upload are saved and shown as chips', async ({
page,
}) => {
Expand Down Expand Up @@ -584,7 +596,9 @@ test.describe('Case detail — the Documents tab', () => {
])
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-012-an-informatieobject-must-carry-keywords-you-can-filter-on
// @e2e exclude The keyword filter is not in the canonical spec. REQ-ZAK-012
// "Filter the list on a keyword" governs it and lives in the open change
// documents-on-the-case; canonical REQ-ZAK-004c is status and date filtering.
test('the keyword filter narrows the list, and clearing it restores both', async ({
page,
}) => {
Expand Down Expand Up @@ -623,7 +637,7 @@ test.describe('Case detail — the Documents tab', () => {
await expect(rows).toHaveCount(2, { timeout: 20_000 })
})

// @e2e openspec/specs/document-zaakdossier/spec.md#requirement-req-zak-011-the-case-page-must-list-the-dossier-in-a-documents-tab
// @e2e openspec/specs/document-zaakdossier/spec.md#scenario-req-zak-006b-restore-is-disabled-for-definitief-documents
test('Versions on a row opens the panel, and restore is refused on a final document', async ({
page,
}) => {
Expand Down Expand Up @@ -705,7 +719,10 @@ test.describe('Case detail — the Documents tab', () => {
expect(String(stored.status)).toBe('final')
})

// @e2e openspec/specs/template-library/spec.md#requirement-req-005-a-library-template-is-offered-on-the-case
// @e2e exclude No canonical scenario covers the Generate document picker listing
// the library. REQ-005 "The picker lists the library" governs it and lives in the
// open change documents-on-the-case; canonical template-library REQ-001 to
// REQ-004 are the REST and discovery contracts, not this picker.
test('the Generate document picker lists the library by name', async ({
page,
}) => {
Expand Down Expand Up @@ -737,7 +754,10 @@ test.describe('Case detail — the Documents tab', () => {
).toHaveCount(1)
})

// @e2e openspec/specs/beschikking-generatie/spec.md#requirement-generate-a-document-from-the-case-req-bes-012
// @e2e exclude No canonical scenario covers generating a letter onto the
// Documents tab. REQ-BES-012 "Generate a letter onto the Documents tab" governs
// it and lives in the open change documents-on-the-case; canonical REQ-BES-001 is
// the conceptbeschikking composer, a different flow.
test('Generate document files a draft outgoing letter on the case', async ({
page,
}) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/workflows/case-lifecycle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ test.describe('Case lifecycle — state machine', () => {
).toBeVisible({ timeout: 15000 })
})

// @e2e openspec/specs/status-transition-engine/spec.md#scenario-a-handler-advances-a-case
// @e2e openspec/specs/status-transition-engine/spec.md#scenario-successful-transition-with-audit-trail
test('advancing a case status persists and renders the new status', async ({
page,
}) => {
Expand Down
7 changes: 6 additions & 1 deletion tests/e2e/workflows/cases-crud.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,12 @@ test.describe('Cases — full CRUD with persistence', () => {
.toBe(newTitle)
})

// @e2e openspec/specs/case-management/spec.md#delete-a-case
// @e2e exclude This anchor used to read #delete-a-case, which prefix-resolves to
// Scenario CM-03a "Delete a case in initial status", a scenario that says the
// delete SUCCEEDS, while this test asserts a 403 because the case schema declares
// x-openregister-archival. It resolved, so no count caught it. No scenario states
// that a user delete of an archival case is refused and the record survives;
// REQ-CM-03 still describes the pre-archival behaviour and needs amending.
// The `case` schema declares x-openregister-archival, so a case is a record:
// user-driven deletion is rejected (Archiefwet immutability) and removal is
// reserved for the retention-sweep cron. This asserts that guarantee rather
Expand Down
Loading