From 718e3a5ec98050e9b664dc3f9071c7aaea13b3a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 12:59:52 +0000 Subject: [PATCH 1/2] Initial plan From 556f1c0542599cbf3b35dad7fca9649fc96f5ba3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 13:06:53 +0000 Subject: [PATCH 2/2] fix: use per-story buttonName and .first() in AnchoredOverlay e2e tests Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com> --- e2e/components/AnchoredOverlay.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/components/AnchoredOverlay.test.ts b/e2e/components/AnchoredOverlay.test.ts index 525204a5a63..9ceb9f291c1 100644 --- a/e2e/components/AnchoredOverlay.test.ts +++ b/e2e/components/AnchoredOverlay.test.ts @@ -5,6 +5,7 @@ import {themes} from '../test-helpers/themes' const stories: Array<{ title: string id: string + buttonName?: string }> = [ // Default { @@ -59,6 +60,7 @@ const stories: Array<{ { title: 'Fullscreen Variant', id: 'components-anchoredoverlay-features--fullscreen-variant', + buttonName: 'Open Fullscreen on Narrow', }, // Dev { @@ -95,8 +97,9 @@ test.describe('AnchoredOverlay', () => { }) // Open the overlay - await page.locator('button', {hasText: 'Button'}).waitFor() - await page.getByRole('button', {name: 'Button'}).click() + const buttonName = story.buttonName ?? 'Button' + await page.locator('button', {hasText: buttonName}).first().waitFor() + await page.getByRole('button', {name: buttonName}).first().click() expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( `AnchoredOverlay.${story.title}.${theme}${namePostfix}.png`,