test: expand coverage for interactive primitives and SSR safety#82
Draft
test: expand coverage for interactive primitives and SSR safety#82
Conversation
✅ Deploy Preview for pui-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Size Change: 0 B Total Size: 13.7 kB ℹ️ View Unchanged
|
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.
Motivation
documentrender safely under SSR without a DOM.p,command,commandfor) to prevent accidental regressions in markup output.Description
src/__tests__/interactive-primitives.test.tsx,src/__tests__/ssr-no-dom.test.tsx, andsrc/__tests__/attributes-render.test.tsxwith interaction, SSR, and attribute assertions respectively.Enter,Escape,ArrowUp,ArrowDown), overlay close regressions (backdrop/outside clicks), focus restoration, Sheet/Drawer command wiring, Tabs/Toast usage, and rendered attribute assertions.HTMLDialogElementpolyfill in the jsdom tests to emulateshow/showModal/close+ Escape handling for reliable behavior assertions..github/workflows/size.yml,.github/workflows/deploy.yml) to runpnpm testbefore build/deploy and addedjsdomas a dev dependency (updatedpackage.jsonandpnpm-lock.yaml).Testing
pnpm test(Vitest) and all tests passed: 4 test files, 8 tests total, all green.pnpm lint(TS + biome) which reported TypeScript typing errors unrelated to the new tests (notablycommand/commandFortyping mismatches and aselectedprop typing in a test), so linting currently fails and should be addressed separately.Codex Task