test(frontend): cover ShareAccessService - #6296
Conversation
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6296 +/- ##
============================================
+ Coverage 60.67% 60.77% +0.09%
Complexity 3368 3368
============================================
Files 1133 1134 +1
Lines 44141 44195 +54
Branches 4825 4830 +5
============================================
+ Hits 26782 26858 +76
+ Misses 15901 15878 -23
- Partials 1458 1459 +1
*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:
|
|
@mengw15 Can you review this PR? |
|
/request-review @mengw15 |
There was a problem hiding this comment.
Pull request overview
Adds frontend unit test coverage for ShareAccessService (dashboard REST client) to pin URL composition and HTTP methods for share-access endpoints, without changing production code.
Changes:
- Introduces
share-access.service.spec.tsusing AngularHttpTestingController. - Covers
grantAccess,revokeAccess,getOwner, andgetAccessListrequest shapes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What changes were proposed in this PR?
Adds a unit test spec for ShareAccessService, the REST client for grant/revoke/owner/list of resource share-access endpoints (no production code changes). Covers grantAccess, revokeAccess, getOwner, and getAccessList, using Angular's HttpTestingController to pin exact URL composition and HTTP method per endpoint.
Any related issues, documentation, discussions?
Closes #6261.
How was this PR tested?
share-access.service.spec.tspasses locally via ng test (Vitest runner, happy-dom, TestBed + HttpTestingController — no real network calls), along withyarn format:fixandyarn lint.Was this PR authored or co-authored using generative AI tooling?
No.