Repository navigation
test(gui): RTL sprint Phase 1 — pure component tests + infrastructure - #57
Merged
Merged
Conversation
Add RTL test infrastructure and Phase 1 tests covering all pure/panel components. 30 test files, 379 tests passing, thresholds raised. Infrastructure (src/tests/): - storeUtils.ts: Zustand store seed/reset helpers - renderWithProviders.tsx: RTL render wrapper with mocked CliHealthContext - tauriMocks.ts: typed Tauri mock factories (invoke, events, dialogs, shell, app) Phase 1 test files: - panels/panels.test.tsx: BottomPanel, LeftPanel, RightPanel - layouts/MainLayout.test.tsx: all 4 layout slots - components/TabBar.test.tsx: tab switching + active class - components/Toast/ToastContainer.test.tsx: toast display + dismiss - components/ErrorBoundary.test.tsx: error boundary happy/error paths - components/dialogs/BaseDialog.test.tsx: portal, overlay, close, footer - components/canvas/CanvasControls.test.tsx: all 5 buttons + isGenerating - components/canvas/LayerScrubber.test.tsx: null guard, labels, range input - components/layers/LayerRow.test.tsx: icons, summaries, active class, callbacks - components/StreamTab/KeyboardShortcuts.test.tsx: sections, close, overlay Config: - tsconfig.json: add @testing-library/jest-dom to types - vitest.config.ts: raise thresholds (lines 47, fns 80, branches 82, stmts 47)
Local Windows v8 reports inflated branch/function numbers vs CI Linux. Set thresholds from actual CI numbers (lines 50.59, fns 49.62, branches 32.85). Also exclude wind-schema.ts which fails binary parse on CI rolldown.
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.
Add RTL test infrastructure and Phase 1 tests covering all pure/panel components. 30 test files, 379 tests passing, thresholds raised.
Infrastructure (src/tests/):
Phase 1 test files:
Config: