From 2327d61d8eab97cf4552449c8c8e83b4743465e8 Mon Sep 17 00:00:00 2001 From: bchanot Date: Thu, 12 Nov 2026 13:05:43 +0100 Subject: [PATCH] =?UTF-8?q?test(app):=20=C2=AB=20Plus=20=C2=BB=20Escape=20?= =?UTF-8?q?in=20the=20R1=20browser=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/app/e2e/shell/editor-deselect.spec.ts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/apps/app/e2e/shell/editor-deselect.spec.ts b/apps/app/e2e/shell/editor-deselect.spec.ts index 55add1cd..05a6fed3 100644 --- a/apps/app/e2e/shell/editor-deselect.spec.ts +++ b/apps/app/e2e/shell/editor-deselect.spec.ts @@ -678,4 +678,42 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => { await report('twin two-finger tap') expect(saves).toEqual([]) }) + + test('Escape closes « Plus » first, then deselects the twin', async ({ + page, + context, + requests, + }) => { + const { actor, saves } = await open(page, false) + requests.forbid(actor.account.email, actor.account.password) + await selectTab(page, dict, 'annotations') + const canvas = page.getByTestId('catalogue-canvas') + await expect(canvas).toBeVisible() + const cdp = await context.newCDPSession(page) + await canvas.scrollIntoViewIfNeeded() + const marker = await page + .getByTestId('catalogue-canvas-drawing') + .locator('[data-anno-id="pt-a"]') + .first() + .boundingBox() + await tap(cdp, { + x: marker!.x + marker!.width / 2, + y: marker!.y + marker!.height / 2, + }) + await expect(selectionTag(page)).toContainText(POINT) + + const more = page.locator('#editor-tabs-more-button') + await more.click() + await expect(more).toHaveAttribute('aria-expanded', 'true') + await canvas.focus() + await page.keyboard.press('Escape') + await expect(more).toHaveAttribute('aria-expanded', 'false') + await expect(more).toBeFocused() + await expectKept(page, POINT) + + await page.keyboard.press('Escape') + await expectDeselected(page) + await expect(liveRegion(page)).toHaveCount(1) + expect(saves).toEqual([]) + }) })