Add Scene 7 claim report workflow
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { expect, test } from '@playwright/test'
|
||||
|
||||
test('pasting one Google Patents screenshot verifies the Scene 7 objective', async ({ page, request }) => {
|
||||
test('pasting, connecting, and citing one patent screenshot completes the Scene 7 report lesson', async ({ page, request }) => {
|
||||
test.setTimeout(60_000)
|
||||
const levels = await (await request.get('/api/levels')).json() as { id:string }[]
|
||||
const sceneSeven = levels.find(level => level.id.startsWith('barricelli-inventor-proof-case-'))
|
||||
@@ -44,12 +44,33 @@ test('pasting one Google Patents screenshot verifies the Scene 7 objective', asy
|
||||
|
||||
await expect(page.locator('.source-file-widget')).toHaveCount(1)
|
||||
await expect(page.locator('.source-file-widget')).toHaveClass(/\barriving\b/)
|
||||
const complete = page.locator('.goal-complete-card')
|
||||
await expect(complete).toBeVisible({ timeout:20_000 })
|
||||
await expect(complete).toContainText('SOURCE VERIFIED — NILS AALL BARRICELLI: INVENTOR')
|
||||
await expect(complete.getByRole('button', { name:/RETURN TO BOARD/ })).toBeVisible()
|
||||
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('.evidence-card.claim').click()
|
||||
await page.getByRole('button',{ name:'Red thread' }).click()
|
||||
await page.locator('.source-file-widget').click()
|
||||
await expect(page.locator('.thread-editor')).toBeVisible()
|
||||
await expect(page.getByLabel('Thread tag')).toHaveValue('Proof that…')
|
||||
await page.getByRole('button',{ name:'ADD TAG & TIGHTEN' }).click()
|
||||
|
||||
await page.getByRole('button',{ name:'Case report' }).click()
|
||||
await expect(page.locator('.case-report')).toBeVisible()
|
||||
await expect(page.locator('.report-claim')).toContainText('Nils Aall Barricelli was an inventor')
|
||||
await expect(page.locator('.report-evidence')).toContainText('Exhibit 1')
|
||||
await page.getByRole('button',{ name:'SUBMIT CASE REPORT' }).click()
|
||||
await expect(page.locator('.report-verdict')).toContainText("The evidence is good enough, but the report itself won't hold up in court")
|
||||
|
||||
await page.getByLabel('Evidence statement for Exhibit 1').fill('Proof that Nils Aall Barricelli is named as inventor on patent GB695913A.')
|
||||
await page.getByLabel('Date for Exhibit 1').fill('1953-08-19')
|
||||
await page.getByLabel('Source for Exhibit 1').fill('Google Patents · GB695913A')
|
||||
await page.getByLabel('Source link for Exhibit 1').fill('https://patents.google.com/patent/GB695913A/en')
|
||||
await page.getByRole('button',{ name:'SUBMIT CASE REPORT' }).click()
|
||||
await expect(page.locator('.report-verdict')).toContainText('Case report accepted')
|
||||
await expect(page.getByRole('button',{ name:/CLOSE CASE/ })).toBeVisible()
|
||||
|
||||
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.report).toMatchObject({ status:'accepted',investigatorName:'Player' })
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user