Repository navigation
test(core): move the unit tests into the stories' play functions - #571
Merged
Merged
Conversation
…stener doesn't stop the others
|
|
|
View your CI Pipeline Execution ↗ for commit 4486f78
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
ggdaltoso
marked this pull request as ready for review
October 6, 2026 18:17
This was referenced Oct 8, 2026
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.
Moves
@react95/core's unit tests into the stories, asplayfunctions. Each component's behavior is now tested in a real browser, shows up step by step in the Interactions panel, and runs in CI withtest-storybook. Writing those tests turned up several bugs, fixed here too.Tests in the stories
delay, Tabs swaps the content, the TaskBar keeps its buttons in the order the windows opened, and so on. Snapshots are gone; each one became explicit checks..storybook/pointer.tsgives play functions a real hover in Vitest (List's submenus open on CSS:hover, which a simulated hover doesn't trigger)..storybook/theme-color.tsresolves theme tokens, so the active/inactive TitleBar and Modal checks work with any theme.toggle, focus and the events.components/shared/events.test.ts), which now runs in Node. The core test setup it no longer needs (happy-dom, mocks, snapshot resolver) is removed.Fixes
classNameno longer replaces the input's own class (the native radio showed up on top of the Win95 one).aria-current. It registers with the TaskBar once, so a re-render of its parent no longer steals the focus or moves its TaskBar button.Refactors and cleanup
modalControlleris removed: it wasn't exported or used.useModalWindowshook, which also subscribes to the events once.satisfieswhere TypeScript can handle it.packages/core/tsconfig.jsonno longer asks for declarations, which it never emits and which made newer TypeScript versions warn aboutsatisfies.className.Screenshots
Interactions panel
Tests
Merging this publishes
@react95/core9.8.5 (patch), and the CRA templates 0.2.5 along with it, as on every core release (confirmed withnx release --dry-run).