Skip to content

test(frontend): cover ShareAccessService - #6296

Merged
mengw15 merged 4 commits into
apache:mainfrom
Neilk1021:task/ShareAccessServiceSpecTests
Jul 9, 2026
Merged

test(frontend): cover ShareAccessService#6296
mengw15 merged 4 commits into
apache:mainfrom
Neilk1021:task/ShareAccessServiceSpecTests

Conversation

@Neilk1021

@Neilk1021 Neilk1021 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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.ts passes locally via ng test (Vitest runner, happy-dom, TestBed + HttpTestingController — no real network calls), along with yarn format:fix and yarn lint.

Was this PR authored or co-authored using generative AI tooling?

No.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.77%. Comparing base (18ccda9) to head (91da7b4).
⚠️ Report is 12 commits behind head on main.

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     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from 544033b
agent-service 44.59% <ø> (ø) Carriedforward from 544033b
amber 66.14% <ø> (ø) Carriedforward from 544033b
computing-unit-managing-service 0.00% <ø> (ø) Carriedforward from 544033b
config-service 52.30% <ø> (ø) Carriedforward from 544033b
file-service 63.97% <ø> (ø) Carriedforward from 544033b
frontend 52.71% <ø> (+0.27%) ⬆️
notebook-migration-service 78.57% <ø> (ø) Carriedforward from 544033b
pyamber 91.18% <ø> (ø) Carriedforward from 544033b
workflow-compiling-service 55.14% <ø> (ø) Carriedforward from 544033b

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Neilk1021

Copy link
Copy Markdown
Contributor Author

@mengw15 Can you review this PR?

@Neilk1021

Copy link
Copy Markdown
Contributor Author

/request-review @mengw15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts using Angular HttpTestingController.
  • Covers grantAccess, revokeAccess, getOwner, and getAccessList request shapes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/app/dashboard/service/user/share-access/share-access.service.spec.ts Outdated

@mengw15 mengw15 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mengw15
mengw15 added this pull request to the merge queue Jul 9, 2026
Merged via the queue into apache:main with commit 12f9f1a Jul 9, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add unit test coverage for ShareAccessService

4 participants