test: add real specs for left-panel SettingsComponent #4992
Merged
aglinxinyuan merged 5 commits intoapache:mainfrom May 9, 2026
Merged
test: add real specs for left-panel SettingsComponent #4992aglinxinyuan merged 5 commits intoapache:mainfrom
aglinxinyuan merged 5 commits intoapache:mainfrom
Conversation
Contributor
Author
|
/request-review @aglinxinyuan |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a real Vitest unit test suite for the workspace left-panel SettingsComponent and enables it in the Angular/Vitest test build so it’s compiled and executed as part of the frontend test run.
Changes:
- Implemented a full
SettingsComponentspec covering form initialization, validation, and service/persistence interactions. - Removed
settings.component.spec.tsfrom Angular/Vitest exclude lists so the test is discovered and run.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/app/workspace/component/left-panel/settings/settings.component.spec.ts | Replaces placeholder with a set of unit tests validating form behavior and persistence wiring. |
| frontend/angular.json | Removes the spec from the unit-test builder exclude list so it runs under Vitest. |
| frontend/src/tsconfig.spec.json | Removes the spec from TS exclude so it’s type-checked/compiled in the spec build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
10cc9fd to
6f1e61e
Compare
aglinxinyuan
approved these changes
May 9, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4992 +/- ##
============================================
- Coverage 43.18% 43.13% -0.05%
+ Complexity 2186 2175 -11
============================================
Files 1031 1031
Lines 38153 38104 -49
Branches 4004 3997 -7
============================================
- Hits 16475 16435 -40
+ Misses 20641 20639 -2
+ Partials 1037 1030 -7
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What changes were proposed in this PR?
Replaced the placeholder spec at frontend/src/app/workspace/component/left-panel/settings/settings.component.spec.ts (previously just a license header) with 10 real test cases for SettingsComponent:
Also removed settings.component.spec.ts from the placeholder exclusion lists in frontend/angular.json (test builder exclude) and frontend/src/tsconfig.spec.json (exclude) so the spec is actually compiled and run.
Any related issues, documentation, or discussions?
Closes: #4965
How was this PR tested?
Ran the new spec via the Angular/Vitest test runner:
npx ng test --watch=false --include="src/app/workspace/component/left-panel/settings/settings.component.spec.ts"
Was this PR authored or co-authored using generative AI tooling?
Co-Authored with Claude Opus 4.7 in compliance with ASF