Add structured moderation assessments with revision history
This commit is contained in:
@@ -331,6 +331,20 @@ it('links case records to workspaces and preserves case filters while paging', (
|
||||
game: 't5',
|
||||
guid,
|
||||
title: 'Chat investigation',
|
||||
assessment: {
|
||||
revision: 3,
|
||||
summary: 'The threat remains ambiguous.',
|
||||
rules: [],
|
||||
findings: [
|
||||
{
|
||||
category: 'threats',
|
||||
finding: 'inconclusive',
|
||||
detail: 'Context is insufficient.'
|
||||
}
|
||||
],
|
||||
actor: 'Moderator',
|
||||
createdAt: '2026-10-16T12:00:00Z'
|
||||
},
|
||||
status: 'escalated',
|
||||
priority: 'high',
|
||||
assigneeId: 'staff-1',
|
||||
@@ -349,6 +363,12 @@ it('links case records to workspaces and preserves case filters while paging', (
|
||||
);
|
||||
expect(document.querySelector('#moderation-results')?.textContent).toContain('Escalated');
|
||||
expect(document.querySelector('#moderation-results')?.textContent).toContain('Moderator');
|
||||
expect(document.querySelector('#moderation-results')?.textContent).toContain(
|
||||
'The threat remains ambiguous.'
|
||||
);
|
||||
expect(document.querySelector('[aria-label="Assessment findings"]')?.textContent).toMatch(
|
||||
/Threats\s*·\s*Inconclusive/
|
||||
);
|
||||
button('Next').click();
|
||||
const destination = new URL(navigation.goto.mock.calls.at(-1)![0], 'http://localhost');
|
||||
expect(destination.searchParams.get('caseStatus')).toBe('active');
|
||||
|
||||
Reference in New Issue
Block a user