test(app): former PDF, observation card, route and schema assertions restored on v3; foreign JSON attachment reported as no_attachment; doc counts

This commit is contained in:
bchanot committed 2026-10-10 12:21:19 +02:00
1 parent 06a2e86f3c
commit 17a6d9b323
9 files changed
+406 -27

No files matched your search

+29 -15
View File
@@ -41,21 +41,19 @@ beforeEach(() => {
sessionStorage.setItem(DISCLAIMER_FLAG, '1')
window.scrollTo = vi.fn() as unknown as typeof window.scrollTo
useReportStore.setState({ report: null, activeObservationIndex: 0 })
useReportStore
.getState()
.hydrateReport(
minimalReport(sheet, {
observations: [
{
id: 'o1',
zones: [],
findings: [],
freeTextFindings: [],
comment: '',
},
],
}),
)
useReportStore.getState().hydrateReport(
minimalReport(sheet, {
observations: [
{
id: 'o1',
zones: [],
findings: [],
freeTextFindings: [],
comment: '',
},
],
}),
)
})
afterEach(() => {
cleanup()
@@ -150,6 +148,22 @@ describe('EditorRoute on the canonical sheet', () => {
])
})
it('cancelling the vertebra picker keeps the spine zone without vertebrae', async () => {
const user = userEvent.setup()
await mount()
clickZone('cervical')
const dialog = await screen.findByRole('dialog', {
name: /Vertèbres cervicales/,
})
await user.click(within(dialog).getByText('C3'))
await user.click(
within(dialog).getByRole('button', { name: fr['common.cancel'] }),
)
expect(zonesOf().map((z) => [z.annotationId, z.vertebrae])).toEqual([
['cervical', undefined],
])
})
it('the head trigger opens the detail view by its name and its zones carry the head view id', async () => {
await mount()
clickZone('head-trigger')