Adding fixes to board, simplifications
This commit is contained in:
@@ -17,7 +17,7 @@ async function waitForSave(page: Page, action: () => Promise<void>) {
|
||||
}
|
||||
|
||||
async function classify(page: Page, name: string, kind: 'PERSON' | 'ORGANIZATION', summary: string) {
|
||||
if (!await page.locator('.brief-panel').isVisible()) await page.getByRole('button', { name: 'Case brief', exact: true }).click()
|
||||
if (!await page.locator('.brief-panel').isVisible()) await page.getByRole('button', { name: 'Brief', exact: true }).click()
|
||||
const concept = page.locator('.brief-concepts section').filter({ hasText: name })
|
||||
await waitForSave(page, () => concept.getByRole('button', { name: kind, exact: true }).click())
|
||||
await expect(page.locator('.brief-panel')).toBeVisible()
|
||||
@@ -50,7 +50,7 @@ test('a cloned Glass Harbor level can be solved without modifying its template',
|
||||
await page.goto(`/?level=${playable.id}`)
|
||||
await expect(page.getByRole('heading', { name: 'The Glass Harbor Diversion' })).toBeVisible()
|
||||
await expect(page.locator('.documents-panel')).toHaveClass(/\bclosed\b/)
|
||||
await page.locator('.open-files').click()
|
||||
await page.getByRole('button', { name: 'EVIDENCE', exact: true }).click()
|
||||
await page.getByRole('searchbox', { name: 'Search inside documents', exact: true }).fill('Elias')
|
||||
await expect(page.locator('.doc-row')).toHaveCount(1)
|
||||
await expect(page.locator('.doc-row')).toContainText('Carrier Dispatch Manifest · H&F 14')
|
||||
@@ -59,18 +59,18 @@ test('a cloned Glass Harbor level can be solved without modifying its template',
|
||||
await page.getByRole('button', { name: 'Close documents', exact: true }).click()
|
||||
await expect(page.locator('.evidence-card.folder')).toHaveCount(3)
|
||||
await expect(page.locator('.timeline .marker')).toHaveCount(8)
|
||||
await expect(page.locator('.timeline-label button')).toHaveText('1987-10-01 — 1987-10-31')
|
||||
await expect(page.locator('.timeline-range')).toHaveText('1987-10-01 — 1987-10-31')
|
||||
const dispatchMarker = await page.getByRole('button', { name: '1987-10-16 — Carrier Dispatch Manifest · H&F 14', exact: true }).boundingBox()
|
||||
const auctionMarker = await page.getByRole('button', { name: '1987-10-24 — Meridian Maritime Auction · Lot 117', exact: true }).boundingBox()
|
||||
expect(dispatchMarker).not.toBeNull()
|
||||
expect(auctionMarker).not.toBeNull()
|
||||
expect(auctionMarker!.x - dispatchMarker!.x).toBeGreaterThan(100)
|
||||
|
||||
await page.getByRole('button', { name: 'TIMELINE', exact: true }).click()
|
||||
await page.getByRole('button', { name: 'Timeline settings', exact: true }).click()
|
||||
await page.getByLabel('Timeline start date').fill('1987-10-10')
|
||||
await page.getByLabel('Timeline end date').fill('1987-10-26')
|
||||
await waitForSave(page, () => page.getByRole('button', { name: 'APPLY RANGE', exact: true }).click())
|
||||
await expect(page.locator('.timeline-label button')).toHaveText('1987-10-10 — 1987-10-26')
|
||||
await expect(page.locator('.timeline-range')).toHaveText('1987-10-10 — 1987-10-26')
|
||||
|
||||
await classify(page, 'Mara Voss', 'PERSON', 'Restoration project officer who sponsored the Warehouse 3 access pass.')
|
||||
await classify(page, 'Elias Vale', 'PERSON', 'Driver of H&F 14; transported CO-771 to Warehouse 3.')
|
||||
|
||||
Reference in New Issue
Block a user