-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Labels
area:web-uiReact web UI functionalityReact web UI functionalitygood first issueGood for newcomersGood for newcomerstestsUnit test improvements and coverageUnit test improvements and coverage
Description
Summary
The Web UI currently has zero test coverage. Set up vitest testing infrastructure to enable unit testing of React components and hooks.
Current State
- Location:
control-plane/web/client/ - Framework: React + TypeScript + Vite
- Test files: None (0 test files exist)
- Components: 216 React components untested
Tasks
- Install vitest and React Testing Library as dev dependencies
- Create
vitest.config.tsconfiguration file - Set up test utilities and mocks for common patterns
- Add a simple example test for one component (e.g.,
StatusBadge.tsx) - Add test scripts to
package.json(test,test:watch,test:coverage)
Acceptance Criteria
-
npm testruns vitest successfully - At least one example test passes
- Test coverage can be generated with
npm run test:coverage - Configuration supports testing React components with jsdom environment
Files to Modify/Create
control-plane/web/client/vitest.config.ts(new)control-plane/web/client/src/test/setup.ts(new)control-plane/web/client/package.json(add devDependencies and scripts)control-plane/web/client/src/components/ui/StatusBadge.test.tsx(example test)
Resources
Using AI to solve this issue? Read our AI-Assisted Contributions guide for testing requirements, prompt strategies, and common pitfalls to avoid.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:web-uiReact web UI functionalityReact web UI functionalitygood first issueGood for newcomersGood for newcomerstestsUnit test improvements and coverageUnit test improvements and coverage