Add classified evidence presentations

This commit is contained in:
2026-08-22 19:28:06 +02:00
parent dc0147aebc
commit 10dcd567c6
18 changed files with 414 additions and 45 deletions
+19 -1
View File
@@ -42,11 +42,27 @@ test('pasting, connecting, and citing one patent screenshot completes the Scene
expect(uploaded.analysis).toMatchObject({ extractionStatus:'succeeded',matchedFlags:['scene7.nils_inventor_proved'],
goals:[expect.objectContaining({ key:'barricelli.inventor-proof',status:'complete',newlyCompleted:true })] })
await expect(page.getByRole('dialog',{ name:'What kind of evidence is this?' })).toBeVisible()
await page.getByRole('button',{ name:'Classify as Clip' }).click()
await expect(page.locator('.source-file-widget')).toHaveCount(1)
await expect(page.locator('.source-file-widget')).toHaveAttribute('data-capture-kind','clipping')
await expect(page.locator('.source-file-widget')).toHaveClass(/\barriving\b/)
await expect(page.locator('.goal-complete-card')).toHaveCount(0)
await expect(page.locator('.evidence-card.claim')).toContainText('Nils Aall Barricelli was an inventor')
await page.locator('.source-file-widget').dblclick()
await page.getByRole('button',{ name:'TYPE',exact:true }).click()
await page.getByRole('menuitemradio',{ name:/Mugshot/ }).click()
await expect(page.locator('.source-file-widget')).toHaveAttribute('data-capture-kind','photo')
await page.getByRole('button',{ name:'TYPE',exact:true }).click()
await page.getByRole('menuitemradio',{ name:/Clip/ }).click()
await expect(page.locator('.source-file-widget')).toHaveAttribute('data-capture-kind','clipping')
await page.getByRole('button',{ name:'FILE',exact:true }).click()
await page.getByRole('menuitem',{ name:/INFO/ }).click()
await expect(page.getByLabel('Board presentation')).toHaveValue('clipping')
await page.getByRole('button',{ name:'Close file editor' }).click()
await page.getByRole('button',{ name:'Close document' }).click()
await page.locator('.evidence-card.claim').click()
await page.getByRole('button',{ name:'Red thread' }).click()
await page.locator('.source-file-widget').click()
@@ -71,6 +87,8 @@ test('pasting, connecting, and citing one patent screenshot completes the Scene
const level = await (await request.get(`/api/levels/${sceneSeven.id}`)).json()
expect(level.goals).toEqual([expect.objectContaining({ key:'barricelli.inventor-proof',status:'complete',newlyCompleted:false })])
expect(level.exhibits.filter((exhibit: { type:string }) => exhibit.type === 'document')).toHaveLength(1)
expect(level.exhibits.filter((exhibit: { type:string }) => exhibit.type === 'document')).toEqual([
expect.objectContaining({ captureKind:'clipping',width:210,height:194 }),
])
expect(level.report).toMatchObject({ status:'accepted',investigatorName:'Player' })
})