test(frontend): add unit tests for UserProjectSectionComponent#6835
test(frontend): add unit tests for UserProjectSectionComponent#6835Musxeto wants to merge 2 commits into
Conversation
|
👋 Thanks for your first contribution to Texera, @Musxeto! If you're looking for a good place to start, browse issues labeled You can drive common housekeeping yourself by commenting one of these commands on its own line:
Each command must match exactly: |
Automated Reviewer SuggestionsBased on the
|
|
/request-review @Ma77Ball |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6835 +/- ##
=========================================
Coverage 76.28% 76.28%
Complexity 3452 3452
=========================================
Files 1161 1161
Lines 45916 45916
Branches 5099 5099
=========================================
Hits 35025 35025
Misses 9327 9327
Partials 1564 1564
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/request-review @xuang7 |
What changes were proposed in this PR?
Adds Vitest unit test coverage for
UserProjectSectionComponent(user-project-section.component.spec.ts) covering:ActivatedRouteURL params (getUserProjectMetadata,retrieveProject,getProjectList,refreshFilesOfProject, component field bindings, and handling of malformed route segments).getUserProjectFilesArray) and fallback to an empty array[].updateProjectColor) for valid HEX formats, invalid HEX notification handling, and ignoring unchanged values.removeProjectColor) for populated and missing/null color states.No production source code files were modified.
Any related issues, documentation, discussions?
Closes #6634
How was this PR tested?
Ran Vitest unit tests via Angular CLI:
npx ng test --include src/app/dashboard/component/user/user-project/user-project-section/user-project-section.component.spec.tsResult: 7 passed, 1 failed (8 total tests).
Was this PR authored or co-authored using generative AI tooling?
No