Skip to content

test(frontend): add unit tests for ComputingUnitActionsService#6468

Merged
aglinxinyuan merged 3 commits into
apache:mainfrom
Ma77Ball:test/computing-unit-actions-service-spec
Jul 17, 2026
Merged

test(frontend): add unit tests for ComputingUnitActionsService#6468
aglinxinyuan merged 3 commits into
apache:mainfrom
Ma77Ball:test/computing-unit-actions-service-spec

Conversation

@Ma77Ball

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

  • Adds computing-unit-actions.service.spec.ts covering ComputingUnitActionsService; no production code changed.
  • Verifies create routing (kubernetes/local) and that an unsupported type throws.
  • Covers the share-access modal config and the terminate confirmation flow (invalid unit, confirm, success and failure notifications).

Any related issues, documentation, discussions?

Closes: #6456

How was this PR tested?

  • Run cd frontend && npx nx test gui --include="**/computing-unit-actions.service.spec.ts", expect 10 passed.
  • Full frontend suite runs in CI via yarn test:ci, selected by the auto-applied frontend label.

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

Co-authored with Claude Opus 4.8 in compliance with ASF

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

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 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.28%. Comparing base (c7473a1) to head (2f89c0c).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6468      +/-   ##
============================================
+ Coverage     70.20%   70.28%   +0.07%     
  Complexity     3390     3390              
============================================
  Files          1142     1142              
  Lines         44844    44871      +27     
  Branches       4949     4955       +6     
============================================
+ Hits          31484    31537      +53     
+ Misses        11725    11696      -29     
- Partials       1635     1638       +3     
Flag Coverage Δ *Carryforward flag
access-control-service 70.00% <ø> (ø) Carriedforward from fca79f7
agent-service 76.76% <ø> (ø) Carriedforward from fca79f7
amber 66.68% <ø> (ø) Carriedforward from fca79f7
computing-unit-managing-service 9.97% <ø> (ø) Carriedforward from fca79f7
config-service 52.30% <ø> (ø) Carriedforward from fca79f7
file-service 65.63% <ø> (ø) Carriedforward from fca79f7
frontend 69.15% <ø> (+0.18%) ⬆️
notebook-migration-service 78.94% <ø> (ø) Carriedforward from fca79f7
pyamber 91.19% <ø> (ø) Carriedforward from fca79f7
workflow-compiling-service 55.14% <ø> (ø) Carriedforward from fca79f7

*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.

@Ma77Ball

Copy link
Copy Markdown
Contributor Author

/request-review @aglinxinyuan

@aglinxinyuan aglinxinyuan 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!

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

This PR adds Vitest-based unit test coverage for ComputingUnitActionsService in the Angular frontend, addressing the gap described in #6456 without changing production code.

Changes:

  • Adds a new spec file covering create() routing for kubernetes/local requests and unsupported types.
  • Adds tests for openShareAccessModal() to validate the modal seed data and default parameter behavior.
  • Adds tests for confirmAndTerminate() covering invalid units, opening the confirmation modal, and success/failure notification behavior.

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

@aglinxinyuan
aglinxinyuan added this pull request to the merge queue Jul 17, 2026
Merged via the queue into apache:main with commit 16b917c Jul 17, 2026
21 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 frontend unit tests for ComputingUnitActionsService

4 participants