Set up vitest testing infrastructure, with sample test cases for status badge component#191
Merged
AbirAbbas merged 3 commits intoAgent-Field:mainfrom Feb 27, 2026
Conversation
00c5612 to
6b1b5cf
Compare
Contributor
|
will merge it just fixing changelog and cla workflow |
6b1b5cf to
00c5612
Compare
Resolve CHANGELOG.md conflict: keep vitest entry under [Unreleased] above the existing rc.4 release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AbirAbbas
approved these changes
Feb 27, 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.
Summary
Sets up Vitest testing infrastructure for the Web UI (
control-plane/web/client/), which previously had zero test coverage.New files:
vitest.config.ts- Vitest config with jsdom environment, @ path alias, and v8 coverage providersrc/test/setup.ts- imports@testing-library/jest-domto extend Vitest with DOM matcherssrc/test/components/status/StatusBadge.test.tsx- comprehensive test suite forStatusBadgeand related exportsModified files:
package.json- added devDependencies (vitest,@testing-library/react,@testing-library/jest-dom,@testing-library/user-event,@vitest/coverage-v8,jsdom) and scripts (test,test:watch,test:coverage)scripts/test-all.sh- wiresnpm run testinto the global test runner alongside the existing lint stepStatus Badge tests (
StatusBadge.test.tsx) :AgentStateBadge,HealthStatusBadge,LifecycleStatusBadgeconvenience exportsgetHealthScoreColorandgetHealthScoreBadgeVariantutility functionsTesting
./scripts/test-all.shnpm run testnpm run test:coveragenpm run test:watchStatusBadge.test.tsxvia:npm run test -- src/test/components/status/StatusBadge.test.tsxChecklist
CHANGELOG.md.Screenshots (if UI-related)
Related issues
Fixes: #103