fix(app): unreadable permissions show a retry, never the form (V1-2.5 L1)

Owner checkpoint 2026-11-02: creation page checks loading, server refusal, failed read, then the editor rule; Administration home shows the same notice. reloadAccess re-reads roles and grants without wiping held state; refreshAccount (no caller) removed. Zone panel live region always mounted. Unit and e2e for reviewer-only and editor.
This commit is contained in:
bchanot committed 2026-11-02 21:21:59 +01:00
1 parent 14ff890761
commit 4111efa1d1
15 files changed
+856 -56

No files matched your search

+34
View File
@@ -195,6 +195,40 @@ for (const [locale, dict] of LANGUAGES) {
await expectNoHorizontalOverflow(page, `the sheet page at ${width} px`)
}
// Narrow screens (viewport set here, whatever the project): the zone
// panel keeps its live region from the first render, and the references
// card never covers the drawing.
const original = page.viewportSize()!
for (const width of [320, 375]) {
await page.setViewportSize({ width, height: 667 })
await openSheet(page, `/app/anatomy/${listed.id}`, name(listed))
const panel = page.locator('[aria-live="polite"]', {
has: page.locator('#catalogue-zone-title'),
})
await expect(panel, `live region before a pick at ${width} px`).toHaveCount(1)
const chooser = page.getByRole('combobox', {
name: dict['catalogue.zone.choose'],
})
const first = await chooser.locator('option').nth(1).getAttribute('value')
await chooser.selectOption(first!)
const zoneName = (await chooser.locator('option:checked').textContent()) ?? ''
await expect(panel, `live region after a pick at ${width} px`).toContainText(zoneName)
const drawingBox = await page
.getByTestId('catalogue-canvas-drawing')
.locator('svg')
.first()
.boundingBox()
const referencesBox = await page
.getByRole('heading', { level: 2, name: dict['catalogue.references.title'] })
.locator('xpath=ancestor::section[1]')
.boundingBox()
expect(
referencesBox!.y,
`references below the drawing at ${width} px`,
).toBeGreaterThanOrEqual(drawingBox!.y + drawingBox!.height - 1)
}
await page.setViewportSize(original)
// A zone picked on the drawing, then one from the list: its panel shows.
const zone = page.getByRole('combobox', {
name: dict['catalogue.zone.choose'],