From 1f555c095aa044df1438f963be8a80cc4298b95f Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Mon, 19 Oct 2026 13:00:14 -0400 Subject: [PATCH] test(e2e): two chat specs follow the pan-and-zoom preview and the renamed New tab chat row (#30755) Co-authored-by: E2E Test --- tests/e2e/native-chat-copy-image.spec.ts | 8 +++++--- tests/e2e/structured-chat-tabs-open-close.spec.ts | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/e2e/native-chat-copy-image.spec.ts b/tests/e2e/native-chat-copy-image.spec.ts index f32687dd7b4..cb3cc1a652c 100644 --- a/tests/e2e/native-chat-copy-image.spec.ts +++ b/tests/e2e/native-chat-copy-image.spec.ts @@ -97,8 +97,10 @@ test('Copy image puts the full-size image on the clipboard and keeps the preview await thumbnail.click() const preview = orcaPage.getByRole('dialog') - const fullSize = preview.getByRole('img', { name: imageName }) - await fullSize.click({ button: 'right' }) + await expect(preview.getByRole('img', { name: imageName })).toBeVisible() + // Why: the image ignores the pointer so the pan-and-zoom canvas under it takes the click. + const previewCanvas = preview.getByTestId('pan-zoom-image-canvas') + await previewCanvas.click({ button: 'right' }) await copyImage.click() await expect.poll(takeCopiedImageSize).toBe('800x600') // Why: the preview's dismissal fires on that click, so once the menu has fully left the page @@ -106,7 +108,7 @@ test('Copy image puts the full-size image on the clipboard and keeps the preview await expect(orcaPage.getByRole('menu')).toHaveCount(0) await expect(preview).toHaveAttribute('data-state', 'open') - await fullSize.click({ button: 'right' }) + await previewCanvas.click({ button: 'right' }) await expect(copyImage).toBeVisible() await preview.getByRole('button', { name: 'Close' }).click() await expect(preview).toHaveCount(0) diff --git a/tests/e2e/structured-chat-tabs-open-close.spec.ts b/tests/e2e/structured-chat-tabs-open-close.spec.ts index d80b1cefcb7..02f108a1dbc 100644 --- a/tests/e2e/structured-chat-tabs-open-close.spec.ts +++ b/tests/e2e/structured-chat-tabs-open-close.spec.ts @@ -99,7 +99,10 @@ test.describe('structured chat tabs', () => { // A chat the window opens from the New tab menu. await page.getByRole('button', { name: 'New tab' }).click({ force: true }) - const claudeOption = page.getByRole('menuitem', { name: /^Claude(?:\s|$)/i }).first() + const claudeOption = page.getByRole('menuitem', { + name: 'Start a chat with Claude', + exact: true + }) await expect(claudeOption).toBeVisible({ timeout: 15_000 }) await claudeOption.click({ force: true }) let opened: ChatTab | undefined