Skip to content

Fix AnchoredOverlay e2e test button selectors for strict-mode robustness#7643

Closed
Copilot wants to merge 2 commits intoanchored-overlay-e2e-testsfrom
copilot/sub-pr-7641-again
Closed

Fix AnchoredOverlay e2e test button selectors for strict-mode robustness#7643
Copilot wants to merge 2 commits intoanchored-overlay-e2e-testsfrom
copilot/sub-pr-7641-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Two stories in the AnchoredOverlay VRT suite produced unreliable selectors: Portal Inside Scrolling Element renders 200 buttons named "Button" (Playwright strict-mode violation on .click()), and Fullscreen Variant uses anchor text "Open Fullscreen on Narrow" instead of "Button".

Changelog

Changed

  • Added buttonName?: string per-story field to AnchoredOverlay.test.ts (mirrors ActionMenu.test.ts pattern)
  • Fullscreen Variant story entry now sets buttonName: 'Open Fullscreen on Narrow' to match its actual anchor label
  • Both button locators now use .first() to avoid Playwright strict-mode violations when multiple matching elements are present (e.g. the 200-button grid in Portal Inside Scrolling Element)

New

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Test-only change; no package release needed.

Testing & Reviewing

Run the VRT suite against AnchoredOverlay stories, specifically verifying:

  • Portal Inside Scrolling Element no longer throws a strict-mode violation
  • Fullscreen Variant correctly opens the overlay before screenshotting

Merge checklist


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 556f1c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on e2e tests for AnchoredOverlay Fix AnchoredOverlay e2e test button selectors for strict-mode robustness Mar 9, 2026
@siddharthkp siddharthkp closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants