feat: improve case brief classification flow
This commit is contained in:
@@ -7,9 +7,12 @@ async function waitForSave(page: Page, action: () => Promise<void>) {
|
||||
}
|
||||
|
||||
async function classify(page: Page, name: string, kind: 'PERSON' | 'ORGANIZATION', summary: string) {
|
||||
await page.getByRole('button', { name: 'BRIEF', exact: true }).click()
|
||||
if (!await page.locator('.brief-panel').isVisible()) await page.getByRole('button', { name: 'Case brief', exact: true }).click()
|
||||
const concept = page.locator('.brief-concepts section').filter({ hasText: name })
|
||||
await concept.getByRole('button', { name: kind, exact: true }).click()
|
||||
await waitForSave(page, () => concept.getByRole('button', { name: kind, exact: true }).click())
|
||||
await expect(page.locator('.brief-panel')).toBeVisible()
|
||||
await expect(concept).toHaveClass(/\bjust-resolved\b/)
|
||||
await concept.getByRole('button', { name: 'EDIT DOSSIER', exact: true }).click()
|
||||
await page.getByLabel('Party summary').fill(summary)
|
||||
await waitForSave(page, () => page.getByRole('button', { name: 'SAVE DOSSIER', exact: true }).click())
|
||||
}
|
||||
@@ -52,6 +55,7 @@ test('a cloned Glass Harbor level can be solved without modifying its template',
|
||||
await classify(page, 'Calder Optical Works', 'ORGANIZATION', 'Supplier that released sealed crate CO-771 to the approved carrier.')
|
||||
await classify(page, 'Harbor & Fell Logistics', 'ORGANIZATION', 'Approved carrier whose vehicle delivered the crate to the wrong address.')
|
||||
await classify(page, 'Voss Antiquities Ltd', 'ORGANIZATION', 'Mara Voss’s company, based at Warehouse 3 and named as auction consignor.')
|
||||
await page.getByRole('button', { name: 'RETURN TO BOARD', exact: true }).click()
|
||||
|
||||
await createEvent(page, 'CO-771 left Calder for North Quay', 'Calder released the sealed lens to Elias Vale in H&F 14 with no alternate delivery authority.', '1987-10-16T16:40', ['Carrier Dispatch Manifest'])
|
||||
await createEvent(page, 'CO-771 was diverted to Warehouse 3', 'Mara Voss sponsored access; H&F 14 entered loaded and left empty. The next-day memorandum was retrospective.', '1987-10-17T22:08', ['Old Glass Harbor Gate Ledger', 'Warehouse 3 Security Photograph', 'Delivery Redirection Memorandum'])
|
||||
|
||||
Reference in New Issue
Block a user