test: add E2E tests for responsive sidebar behavior (#226)#233
Merged
Conversation
Co-authored-by: Ona <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
✅ Post-merge verification skipped — |
Collaborator
Author
|
✅ UI verification skipped — no UI files changed (only |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #226
What
Adds Playwright E2E tests covering the responsive sidebar behavior: mobile Sheet overlay, desktop persistent aside, and
Ctrl+\keyboard shortcut toggle.How
Three tests in
e2e/sidebar-responsive.spec.ts:Mobile viewport (375×667): Verifies the sidebar is hidden by default (no
<aside>element), the hamburger toggle button is visible, and clicking it opens a Sheet overlay (data-slot="sheet-content"withdata-side="left").Desktop viewport (1280×720): Verifies the sidebar renders as a persistent
<aside>with non-zero width, the hamburger toggle is hidden, and no Sheet overlay is present.Keyboard shortcut: Verifies
Ctrl+\collapses the desktop sidebar (width → 0) and a second press reopens it (width > 100). Usesexpect.toPass()to wait for the CSS transition to complete.Testing
pnpm lint— cleanpnpm typecheck— cleanpnpm test— 252 tests passnpx playwright test e2e/sidebar-responsive.spec.ts— 3/3 pass