fix(editor): read-only undo, upload session check, restore and submit guards

This commit is contained in:
bchanot committed 2026-11-04 18:06:40 +01:00
1 parent 5979cd59ec
commit 05c9b3e10b
20 files changed
+102 -33

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ async function expectReadOnly(page: Page) {
test.describe('editor access, narrow screens and axe', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'the widths are set by the tests themselves')
test.skip(isPhone(info), 'the widths are set by the tests themselves') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
@@ -68,7 +68,7 @@ async function openAnnotations(page: Page) {
test.describe('editor annotations (A3)', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
+1 -1
View File
@@ -39,7 +39,7 @@ const mainDrawing = (page: Page) => page.getByTestId('view-main-drawing')
test.describe('editor drawings (A2)', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
+1 -1
View File
@@ -211,7 +211,7 @@ test.describe('equine working copy and commit latency', () => {
test.use({ locale: 'fr-FR', actionTimeout: 30_000 })
// Skipped as a whole on the phone project: beforeAll and afterAll toggle the copies'
// status and must run in one worker only.
test.skip(({ isMobile }) => isMobile, 'editing needs 1 024 px')
test.skip(({ isMobile }) => isMobile, 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
let actor: Actor
let setAside: string[] = []
let copyId = ''
+2 -5
View File
@@ -67,7 +67,7 @@ async function open(page: Page, ...annotations: unknown[]) {
test.describe('editor geometry (adversarial)', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
@@ -255,10 +255,7 @@ test.describe('editor touch path (real browser)', () => {
viewport: { width: 1280, height: 800 },
})
test.beforeEach(async ({ context }, info) => {
test.skip(
isPhone(info),
'a 1 024 px touch screen runs on the desktop project',
)
test.skip(isPhone(info), 'touch at 1 024 px runs on desktop') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
+1 -1
View File
@@ -242,7 +242,7 @@ async function reloadAndRestore(page: Page, sheetId: string) {
test.describe('editor journey (owner trial steps)', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
+2 -2
View File
@@ -83,7 +83,7 @@ async function advanceServer(actor: Actor, draftId: string, revision: number) {
test.describe('editor recovery and concurrency', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
@@ -313,7 +313,7 @@ test.describe('editor recovery and concurrency', () => {
test.describe('rights changing under an open editing session', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {
+1 -1
View File
@@ -41,7 +41,7 @@ async function commitText(field: Locator, value: string) {
test.describe('editor structures (A4)', () => {
test.use({ locale: 'fr-FR', actionTimeout: 15_000 })
test.beforeEach(async ({ context }, info) => {
test.skip(isPhone(info), 'editing needs 1 024 px')
test.skip(isPhone(info), 'editing needs 1 024 px') // floor-guard: allow C16 editing needs >= 1024 px; phone read-only covered in editor-access
await routeToSandbox(context)
})
test.afterEach(async ({ context }) => {