Add e2e tests for AnchoredOverlay #7641
Conversation
- Add VRT tests for all AnchoredOverlay stories (default, features, dev) - Run each test with CSS anchor positioning feature flag on/off
|
There was a problem hiding this comment.
Pull request overview
Adds Playwright VRT coverage for AnchoredOverlay Storybook stories as a preparatory step for upcoming CSS anchor-positioning work.
Changes:
- Introduces a new
AnchoredOverlayPlaywright test suite covering default, features, and dev stories. - Runs VRT snapshots across all supported
themes. - Adds a second snapshot variant with
primer_react_css_anchor_positioningenabled.
- Add viewport support for Fullscreen Variant (xs breakpoint) - Add delay for Reposition dev stories - Use .first() for button locator to handle multi-button stories
- Add 7 new feature stories: CenteredOnPage, AnchorPositionGrid, ScrollWithAnchor, WithinDialog, WithinNestedDialog, WithinDialogOverflowing, WithinStickyElement - Add corresponding CSS styles for new stories - Add e2e tests for all new stories with dialog/nested dialog support
This reverts commit ef646f9.
llastflowers
left a comment
There was a problem hiding this comment.
Looks great! I left a couple small comments. Approving in advance so you won't be blocked ✨
There was a problem hiding this comment.
Just noticed this one is a bit weird; is this intentional?
There was a problem hiding this comment.
Oops, not at all. This test is too wide for snapshotting. Removing it.
| ) | ||
| } | ||
|
|
||
| export const CenteredOnPage = () => { |
There was a problem hiding this comment.
I left a comment on the corresponding snapshot, but also looking at this story, it seems a little bit off. The button isn't visible unless I zoom out a lot. Just wanted to confirm what the expected behavior is here!
There was a problem hiding this comment.
Yeah, it's intentionally a really big story. Doesn't make for a good visual test though.
There was a problem hiding this comment.
Just a small thing, but I wonder if we would want to have this overlay on top of the header (in the z-index sense) instead of underneath it? 👀
There was a problem hiding this comment.
We should, but that's the bug 😄 that Tyler is fixing with anchored position (next PR). I'm just making sure we have tests to not have any regressions
There was a problem hiding this comment.
Oh, ha! Makes sense 😂
Rollout strategy
Merge checklist