fix(cv-qa): preserve ambiguous structures and measure extraction accuracy
This commit is contained in:
@@ -52,6 +52,14 @@ beforeEach(() => {
|
||||
|
||||
afterEach(() => jest.clearAllMocks());
|
||||
|
||||
test('inferred paragraph grouping displays an explicit verification warning without approving it', async () => {
|
||||
currentReview = { ...review, groups: review.groups.map(group => ({ ...group, fields: group.fields.map(field => ({ ...field, method: 'legacy-paragraph-continuation', reviewState: 'needs_review' })) })) };
|
||||
renderImport();
|
||||
expect((await screen.findAllByText('Suggested grouping: verify that this detail belongs to this record before approving it.')).length).toBe(2);
|
||||
expect(screen.getByRole('button', { name: 'Apply reviewed changes' })).toBeDisabled();
|
||||
expect(mockedApi.post).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
test('a source-mapped missing record can be the only approved change and survives stale review without a stale target', async () => {
|
||||
currentReview = { ...review, groups: [], sourceBlocks: [{ id: 'b1', text: 'Engineer', kind: 'paragraph', page: 1 }, { id: 'b2', text: 'Example AS', kind: 'paragraph', page: 1 }], mappingCategories: [{ category: 'jobs', fields: [{ name: 'title', multiple: false }, { name: 'company', multiple: false }] }], targets: [{ category: 'jobs', index: 0, label: 'Saved job' }] };
|
||||
renderImport();
|
||||
|
||||
Reference in New Issue
Block a user