-
Notifications
You must be signed in to change notification settings - Fork 658
Add e2e tests for AnchoredOverlay #7641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
98521f3
Add e2e tests for AnchoredOverlay with feature flag variants
siddharthkp 6c91a3b
Update AnchoredOverlay e2e tests
siddharthkp 606b3c9
Add CSS anchor positioning stories and e2e tests
siddharthkp 2fcd605
Fix Fullscreen Variant button name in e2e test
siddharthkp 0f814d5
test(vrt): update snapshots
siddharthkp 23b25b3
test(AnchoredOverlay): reduce VRT tests to light theme only [skip ci]
siddharthkp 02a55be
Merge branch 'main' into anchored-overlay-e2e-tests
siddharthkp 33e1c44
test(vrt): update snapshots
siddharthkp f185ba9
test(AnchoredOverlay): remove non-light theme snapshots
siddharthkp b9ed6e1
test(ActionList): finish tooltip animations before screenshot
siddharthkp 119ac95
test(ActionList): restore tooltip snapshot from main
siddharthkp 24251d1
test(vrt): update snapshots
siddharthkp 0c831e4
test(AnchoredOverlay): wait for images before screenshot
siddharthkp dfb8f35
test(vrt): update snapshots
siddharthkp c59e516
Revert unrelated snapshot change
siddharthkp ef646f9
Reset dialog scroll position before screenshot
siddharthkp f6ad2b0
Revert "Reset dialog scroll position before screenshot"
siddharthkp 450d80f
test(vrt): update snapshots
siddharthkp 28e44fd
Add scroll position debugging to dialog screenshots
siddharthkp e89111b
within dialog: more stable even if a little incorrect snapshots
siddharthkp 8d1be53
remove flaky tests
siddharthkp e0555d9
Simplify AnchoredOverlay e2e tests, remove problematic dialog tests
siddharthkp b059e72
copy e2e/ActionMenu.test.ts as well
siddharthkp f469574
generate snapshots for ActionMenu
siddharthkp db791d5
Merge branch 'main' into anchored-overlay-e2e-tests
primer[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Binary file added
BIN
+30.6 KB
...ots/ActionMenu-Controlled-Menu-dark-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.6 KB
...t.ts-snapshots/ActionMenu-Controlled-Menu-dark-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.5 KB
...apshots/ActionMenu-Controlled-Menu-dark-dimmed-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.4 KB
.../ActionMenu-Controlled-Menu-dark-high-contrast-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.6 KB
...ots/ActionMenu-Controlled-Menu-dark-tritanopia-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...ts/ActionMenu-Controlled-Menu-light-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
....ts-snapshots/ActionMenu-Controlled-Menu-light-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.1 KB
...ActionMenu-Controlled-Menu-light-high-contrast-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.5 KB
...ts/ActionMenu-Controlled-Menu-light-tritanopia-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...shots/ActionMenu-Custom-Anchor-dark-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...est.ts-snapshots/ActionMenu-Custom-Anchor-dark-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.43 KB
...snapshots/ActionMenu-Custom-Anchor-dark-dimmed-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...ts/ActionMenu-Custom-Anchor-dark-high-contrast-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...shots/ActionMenu-Custom-Anchor-dark-tritanopia-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...hots/ActionMenu-Custom-Anchor-light-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...st.ts-snapshots/ActionMenu-Custom-Anchor-light-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.5 KB
...s/ActionMenu-Custom-Anchor-light-high-contrast-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.47 KB
...hots/ActionMenu-Custom-Anchor-light-tritanopia-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.1 KB
...ctionMenu-Custom-Overlay-Props-dark-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.1 KB
...snapshots/ActionMenu-Custom-Overlay-Props-dark-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.07 KB
...ts/ActionMenu-Custom-Overlay-Props-dark-dimmed-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...onMenu-Custom-Overlay-Props-dark-high-contrast-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.1 KB
...ctionMenu-Custom-Overlay-Props-dark-tritanopia-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...tionMenu-Custom-Overlay-Props-light-colorblind-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...napshots/ActionMenu-Custom-Overlay-Props-light-css-anchor-positioning-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.14 KB
...nMenu-Custom-Overlay-Props-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.12 KB
...tionMenu-Custom-Overlay-Props-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...s-snapshots/ActionMenu-Default-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...Menu.test.ts-snapshots/ActionMenu-Default-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.8 KB
...st.ts-snapshots/ActionMenu-Default-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.3 KB
...napshots/ActionMenu-Default-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...s-snapshots/ActionMenu-Default-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...-snapshots/ActionMenu-Default-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...enu.test.ts-snapshots/ActionMenu-Default-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.2 KB
...apshots/ActionMenu-Default-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.1 KB
...-snapshots/ActionMenu-Default-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...pshots/ActionMenu-Dev-With-Css-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...test.ts-snapshots/ActionMenu-Dev-With-Css-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16 KB
...-snapshots/ActionMenu-Dev-With-Css-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.6 KB
...ots/ActionMenu-Dev-With-Css-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...pshots/ActionMenu-Dev-With-Css-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...shots/ActionMenu-Dev-With-Css-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...est.ts-snapshots/ActionMenu-Dev-With-Css-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...ts/ActionMenu-Dev-With-Css-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...shots/ActionMenu-Dev-With-Css-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...onMenu-Groups-And-Descriptions-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...pshots/ActionMenu-Groups-And-Descriptions-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.9 KB
...ActionMenu-Groups-And-Descriptions-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.1 KB
...enu-Groups-And-Descriptions-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...onMenu-Groups-And-Descriptions-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...nMenu-Groups-And-Descriptions-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...shots/ActionMenu-Groups-And-Descriptions-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.9 KB
...nu-Groups-And-Descriptions-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.8 KB
...nMenu-Groups-And-Descriptions-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...hots/ActionMenu-Inactive-Items-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...st.ts-snapshots/ActionMenu-Inactive-Items-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31.1 KB
...napshots/ActionMenu-Inactive-Items-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+30.5 KB
...s/ActionMenu-Inactive-Items-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...hots/ActionMenu-Inactive-Items-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...ots/ActionMenu-Inactive-Items-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...t.ts-snapshots/ActionMenu-Inactive-Items-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31.3 KB
.../ActionMenu-Inactive-Items-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...ots/ActionMenu-Inactive-Items-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.8 KB
...s/ActionMenu-Links-And-Actions-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.8 KB
...ts-snapshots/ActionMenu-Links-And-Actions-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+23.5 KB
...shots/ActionMenu-Links-And-Actions-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.1 KB
...ctionMenu-Links-And-Actions-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.8 KB
...s/ActionMenu-Links-And-Actions-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.9 KB
.../ActionMenu-Links-And-Actions-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.9 KB
...s-snapshots/ActionMenu-Links-And-Actions-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+23 KB
...tionMenu-Links-And-Actions-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.9 KB
.../ActionMenu-Links-And-Actions-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...shots/ActionMenu-Loading-Items-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...est.ts-snapshots/ActionMenu-Loading-Items-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+22.3 KB
...snapshots/ActionMenu-Loading-Items-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.1 KB
...ts/ActionMenu-Loading-Items-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...shots/ActionMenu-Loading-Items-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...hots/ActionMenu-Loading-Items-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...st.ts-snapshots/ActionMenu-Loading-Items-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...s/ActionMenu-Loading-Items-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...hots/ActionMenu-Loading-Items-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.7 KB
...pshots/ActionMenu-Multi-Select-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.7 KB
...test.ts-snapshots/ActionMenu-Multi-Select-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.6 KB
...-snapshots/ActionMenu-Multi-Select-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.1 KB
...ots/ActionMenu-Multi-Select-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.7 KB
...pshots/ActionMenu-Multi-Select-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
...shots/ActionMenu-Multi-Select-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
...est.ts-snapshots/ActionMenu-Multi-Select-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
...ts/ActionMenu-Multi-Select-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
...shots/ActionMenu-Multi-Select-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...shots/ActionMenu-Single-Select-dark-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...est.ts-snapshots/ActionMenu-Single-Select-dark-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.9 KB
...snapshots/ActionMenu-Single-Select-dark-dimmed-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+15.4 KB
...ts/ActionMenu-Single-Select-dark-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.1 KB
...shots/ActionMenu-Single-Select-dark-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.2 KB
...hots/ActionMenu-Single-Select-light-colorblind-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.2 KB
...st.ts-snapshots/ActionMenu-Single-Select-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.2 KB
...s/ActionMenu-Single-Select-light-high-contrast-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+16.2 KB
...hots/ActionMenu-Single-Select-light-tritanopia-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+23.9 KB
...apshots/AnchoredOverlay-Anchor-Alignment-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+23.9 KB
...horedOverlay.test.ts-snapshots/AnchoredOverlay-Anchor-Alignment-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+26.1 KB
...ots/AnchoredOverlay-Anchor-Position-Grid-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+26.1 KB
...dOverlay.test.ts-snapshots/AnchoredOverlay-Anchor-Position-Grid-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...ts-snapshots/AnchoredOverlay-Anchor-Side-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...s/AnchoredOverlay.test.ts-snapshots/AnchoredOverlay-Anchor-Side-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...apshots/AnchoredOverlay-Custom-Anchor-Id-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...horedOverlay.test.ts-snapshots/AnchoredOverlay-Custom-Anchor-Id-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...est.ts-snapshots/AnchoredOverlay-Default-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...nents/AnchoredOverlay.test.ts-snapshots/AnchoredOverlay-Default-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+10.2 KB
...ots/AnchoredOverlay-Focus-Trap-Overrides-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+10.2 KB
...dOverlay.test.ts-snapshots/AnchoredOverlay-Focus-Trap-Overrides-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.4 KB
...ots/AnchoredOverlay-Focus-Zone-Overrides-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.4 KB
...dOverlay.test.ts-snapshots/AnchoredOverlay-Focus-Zone-Overrides-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+45.9 KB
...shots/AnchoredOverlay-Fullscreen-Variant-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+45.9 KB
...redOverlay.test.ts-snapshots/AnchoredOverlay-Fullscreen-Variant-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...test.ts-snapshots/AnchoredOverlay-Height-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...onents/AnchoredOverlay.test.ts-snapshots/AnchoredOverlay-Height-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...oredOverlay-Offset-Alignment-From-Anchor-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
....test.ts-snapshots/AnchoredOverlay-Offset-Alignment-From-Anchor-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...horedOverlay-Offset-Position-From-Anchor-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+24.2 KB
...y.test.ts-snapshots/AnchoredOverlay-Offset-Position-From-Anchor-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.8 KB
.../AnchoredOverlay-Overlay-Props-Overrides-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+21.8 KB
...erlay.test.ts-snapshots/AnchoredOverlay-Overlay-Props-Overrides-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+62 KB
...dOverlay-Portal-Inside-Scrolling-Element-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+62 KB
...st.ts-snapshots/AnchoredOverlay-Portal-Inside-Scrolling-Element-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.8 KB
...sition-After-Content-Grows-Within-Dialog-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+35.8 KB
...ts/AnchoredOverlay-Reposition-After-Content-Grows-Within-Dialog-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+31.1 KB
...edOverlay-Reposition-After-Content-Grows-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+31.1 KB
...est.ts-snapshots/AnchoredOverlay-Reposition-After-Content-Grows-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
...shots/AnchoredOverlay-Scroll-With-Anchor-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.3 KB
...redOverlay.test.ts-snapshots/AnchoredOverlay-Scroll-With-Anchor-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.2 KB
....test.ts-snapshots/AnchoredOverlay-Width-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+25.2 KB
...ponents/AnchoredOverlay.test.ts-snapshots/AnchoredOverlay-Width-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+33.6 KB
...ts/AnchoredOverlay-Within-Sticky-Element-light-css-anchor-positioning-linux.png
Oops, something went wrong.
Binary file added
BIN
+33.6 KB
...Overlay.test.ts-snapshots/AnchoredOverlay-Within-Sticky-Element-light-linux.png
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,173 @@ | ||
| import {test, expect} from '@playwright/test' | ||
| import {visit} from '../test-helpers/storybook' | ||
| import {viewports} from '../test-helpers/viewports' | ||
| import {waitForImages} from '../test-helpers/waitForImages' | ||
|
|
||
| const stories: Array<{ | ||
| title: string | ||
| id: string | ||
| viewport?: keyof typeof viewports | ||
| waitForText?: string | ||
| buttonName?: string | ||
| openDialog?: boolean | ||
| openNestedDialog?: boolean | ||
| }> = [ | ||
| // Default | ||
| { | ||
| title: 'Default', | ||
| id: 'components-anchoredoverlay--default', | ||
| }, | ||
| // Features | ||
| { | ||
| title: 'Portal Inside Scrolling Element', | ||
| id: 'components-anchoredoverlay-features--portal-inside-scrolling-element', | ||
| }, | ||
| { | ||
| title: 'Custom Anchor Id', | ||
| id: 'components-anchoredoverlay-features--custom-anchor-id', | ||
| }, | ||
| { | ||
| title: 'Height', | ||
| id: 'components-anchoredoverlay-features--height', | ||
| }, | ||
| { | ||
| title: 'Width', | ||
| id: 'components-anchoredoverlay-features--width', | ||
| }, | ||
| { | ||
| title: 'Anchor Alignment', | ||
| id: 'components-anchoredoverlay-features--anchor-alignment', | ||
| }, | ||
| { | ||
| title: 'Anchor Side', | ||
| id: 'components-anchoredoverlay-features--anchor-side', | ||
| }, | ||
| { | ||
| title: 'Offset Position From Anchor', | ||
| id: 'components-anchoredoverlay-features--offset-position-from-anchor', | ||
| }, | ||
| { | ||
| title: 'Offset Alignment From Anchor', | ||
| id: 'components-anchoredoverlay-features--offset-alignment-from-anchor', | ||
| }, | ||
| { | ||
| title: 'Focus Trap Overrides', | ||
| id: 'components-anchoredoverlay-features--focus-trap-overrides', | ||
| }, | ||
| { | ||
| title: 'Focus Zone Overrides', | ||
| id: 'components-anchoredoverlay-features--focus-zone-overrides', | ||
| }, | ||
| { | ||
| title: 'Overlay Props Overrides', | ||
| id: 'components-anchoredoverlay-features--overlay-props-overrides', | ||
| }, | ||
| { | ||
| title: 'Fullscreen Variant', | ||
| id: 'components-anchoredoverlay-features--fullscreen-variant', | ||
| viewport: 'primer.breakpoint.xs', | ||
| buttonName: 'Open Fullscreen on Narrow', | ||
| }, | ||
| { | ||
| title: 'Anchor Position Grid', | ||
| id: 'components-anchoredoverlay-features--anchor-position-grid', | ||
| buttonName: 'Anchor', | ||
| }, | ||
| { | ||
| title: 'Scroll With Anchor', | ||
| id: 'components-anchoredoverlay-features--scroll-with-anchor', | ||
| buttonName: 'Open Overlay', | ||
| }, | ||
| // { | ||
| // title: 'Within Dialog', | ||
| // id: 'components-anchoredoverlay-features--within-dialog', | ||
| // buttonName: 'Open Overlay', | ||
| // openDialog: true, | ||
| // }, | ||
| // { | ||
| // title: 'Within Nested Dialog', | ||
| // id: 'components-anchoredoverlay-features--within-nested-dialog', | ||
| // buttonName: 'Open Overlay', | ||
| // openDialog: true, | ||
| // openNestedDialog: true, | ||
| // }, | ||
| // { | ||
| // title: 'Within Dialog Overflowing', | ||
| // id: 'components-anchoredoverlay-features--within-dialog-overflowing', | ||
| // buttonName: 'Open Overlay', | ||
| // openDialog: true, | ||
| // }, | ||
| { | ||
| title: 'Within Sticky Element', | ||
| id: 'components-anchoredoverlay-features--within-sticky-element', | ||
| buttonName: 'Open Overlay', | ||
| }, | ||
siddharthkp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // Dev | ||
| { | ||
| title: 'Reposition After Content Grows', | ||
| id: 'components-anchoredoverlay-dev--reposition-after-content-grows', | ||
| waitForText: 'content with 300px height', | ||
| }, | ||
| { | ||
| title: 'Reposition After Content Grows Within Dialog', | ||
| id: 'components-anchoredoverlay-dev--reposition-after-content-grows-within-dialog', | ||
| waitForText: 'content with 300px height', | ||
| }, | ||
| ] as const | ||
|
|
||
| const theme = 'light' | ||
|
|
||
| test.describe('AnchoredOverlay', () => { | ||
| for (const story of stories) { | ||
| test.describe(story.title, () => { | ||
| for (const withCSSAnchorPositioning of [false, true]) { | ||
| const namePostfix = withCSSAnchorPositioning ? '.css-anchor-positioning' : '' | ||
|
|
||
| test(`default @vrt${namePostfix ? ` ${namePostfix}` : ''}`, async ({page}) => { | ||
| await visit(page, { | ||
| id: story.id, | ||
| globals: { | ||
| colorScheme: theme, | ||
| ...(withCSSAnchorPositioning && { | ||
| featureFlags: { | ||
| primer_react_css_anchor_positioning: true, | ||
| }, | ||
| }), | ||
| }, | ||
| }) | ||
|
|
||
| if (story.viewport) { | ||
| await page.setViewportSize({ | ||
| width: viewports[story.viewport], | ||
| height: 667, | ||
| }) | ||
| } | ||
|
|
||
| // Open dialog if needed | ||
| if (story.openDialog) { | ||
| await page.getByRole('button', {name: 'Open Dialog'}).click() | ||
| } | ||
|
|
||
| // Open nested dialog if needed | ||
| if (story.openNestedDialog) { | ||
| await page.getByRole('button', {name: 'Open Inner Dialog'}).click() | ||
| } | ||
|
|
||
| // Open the overlay | ||
| const buttonName = story.buttonName ?? 'Button' | ||
| await page.locator('button', {hasText: buttonName}).first().waitFor() | ||
| const overlayButton = page.getByRole('button', {name: buttonName}).first() | ||
| await overlayButton.click() | ||
|
|
||
| // for the dev stories, we intentionally change the content after the overlay is open to test that it repositions correctly | ||
| if (story.waitForText) await page.getByText(story.waitForText).waitFor() | ||
| await waitForImages(page) | ||
|
|
||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `AnchoredOverlay.${story.title}.${theme}${namePostfix}.png`, | ||
| ) | ||
| }) | ||
| } | ||
| }) | ||
| } | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ha! Makes sense 😂