Adding fixes to board, simplifications

This commit is contained in:
2026-08-23 21:35:34 +02:00
parent 9e426e91ab
commit 3a6ad356f6
6 changed files with 26 additions and 32 deletions
+6 -5
View File
@@ -28,17 +28,18 @@ test('move, folder expansion, empty-board pan, desktop wheel zoom, mobile pinch,
await page.goto('/?level=e2e-level&edit=1')
await expect(page.getByRole('heading', { name: 'Browser Safety Test' })).toBeVisible()
await expect(page.getByRole('button', { name: 'ADMIN', exact: true })).toBeVisible()
expect((await page.locator('.menubar nav > button, .menubar nav > .admin-menu > button').allTextContents()).map(label => label.replace(/\d+$/, ''))).toEqual(['EVIDENCE', 'CASE BRIEF', 'TIMELINE', 'HELP', 'ADMIN'])
expect((await page.locator('.menubar nav > button, .menubar nav > .admin-menu > button').allTextContents()).map(label => label.replace(/\d+$/, ''))).toEqual(['EVIDENCE', 'BRIEF', 'HELP', 'ADMIN'])
await expect(page.getByRole('button', { name: 'Timeline settings', exact: true })).toBeVisible()
const temporalLayering = await page.evaluate(() => ({
links: Number.parseInt(getComputedStyle(document.querySelector('.temporal-links')!).zIndex, 10),
timeline: Number.parseInt(getComputedStyle(document.querySelector('.timeline')!).zIndex, 10),
}))
expect(temporalLayering.links).toBeGreaterThan(temporalLayering.timeline)
expect(await page.locator('.timeline .year').first().evaluate(element => Number.parseFloat(getComputedStyle(element).fontSize))).toBeGreaterThanOrEqual(12)
expect(await page.locator('.timeline-label button').evaluate(element => Number.parseFloat(getComputedStyle(element).fontSize))).toBeGreaterThanOrEqual(11)
expect(await page.locator('.timeline-range').evaluate(element => Number.parseFloat(getComputedStyle(element).fontSize))).toBeGreaterThanOrEqual(11)
await expect(page.locator('.documents-panel')).toHaveClass(/\bclosed\b/)
await expect(page.locator('.brief-panel')).toBeVisible()
await expect(page.getByRole('button', { name: 'Case brief', exact: true })).toContainText('2')
await expect(page.getByRole('button', { name: 'Brief', exact: true })).toContainText('2')
await page.getByRole('button', { name: 'Minimize brief', exact: true }).click()
await expect(page.locator('.brief-panel')).toHaveClass(/\bminimized\b/)
await expect(page.locator('.brief-panel > p')).toBeHidden()
@@ -157,7 +158,7 @@ test('move, folder expansion, empty-board pan, desktop wheel zoom, mobile pinch,
await boardViewport.dispatchEvent('pointerup', { pointerId: 42, pointerType: 'touch', isPrimary: false, button: 0, clientX: touchOrigin.x + 150, clientY: touchOrigin.y })
await boardViewport.dispatchEvent('pointerup', { pointerId: 41, pointerType: 'touch', isPrimary: true, button: 0, clientX: touchOrigin.x, clientY: touchOrigin.y })
await page.getByRole('button', { name: 'Case brief', exact: true }).click()
await page.getByRole('button', { name: 'Brief', exact: true }).click()
await expect(page.locator('.brief-panel')).toContainText('Ada Lovelace')
const personConcept = page.locator('.brief-concepts section').filter({ hasText: 'Ada Lovelace' })
await waitForSave(page, () => personConcept.getByRole('button', { name: 'PERSON', exact: true }).click())
@@ -265,6 +266,6 @@ test('hides the admin menu without a verified admin JWT', async ({ browser }) =>
await page.goto('/?level=e2e-level&edit=1')
await expect(page.getByRole('heading', { name: 'Browser Safety Test' })).toBeVisible()
await expect(page.getByRole('button', { name: 'ADMIN', exact: true })).toHaveCount(0)
expect((await page.locator('.menubar nav > button').allTextContents()).map(label => label.replace(/\d+$/, ''))).toEqual(['EVIDENCE', 'CASE BRIEF', 'TIMELINE', 'HELP'])
expect((await page.locator('.menubar nav > button').allTextContents()).map(label => label.replace(/\d+$/, ''))).toEqual(['EVIDENCE', 'BRIEF', 'HELP'])
await context.close()
})