From 11b1c8f35364aea12bee2a72b2bb81f1400901a9 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:49:11 -0700 Subject: [PATCH] test(e2e): dismiss the browser tour before starting screenshot markup (#24534) --- tests/e2e/paired-client-hosted-browser-markup.spec.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/e2e/paired-client-hosted-browser-markup.spec.ts b/tests/e2e/paired-client-hosted-browser-markup.spec.ts index 43572cbff75..519d7530b71 100644 --- a/tests/e2e/paired-client-hosted-browser-markup.spec.ts +++ b/tests/e2e/paired-client-hosted-browser-markup.spec.ts @@ -35,7 +35,13 @@ test('draws and copies a screenshot from a client-hosted browser without replaci const target = { urlPrefix: fixture.origin, remotePageId: browser.remotePageId } await waitForRenderedClientWebview(client.page, target, 'client-hosted fixture never rendered') - await client.page.getByRole('button', { name: 'Got it', exact: true }).click() + // The markup hint also says "Got it" and can appear before the browser tour. + const browserTour = client.page.getByRole('dialog', { + name: 'This page renders on your desktop', + exact: true + }) + await browserTour.getByRole('button', { name: 'Got it', exact: true }).click() + await expect(browserTour).toBeHidden() await testInfo.attach('client-hosted-toolbar', { body: await client.page.screenshot({ path: testInfo.outputPath('toolbar.png') }), contentType: 'image/png'