Skip to content

test(frontend): cover the computing-unit actions service and result panel - #8031

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cov/computing-unit-actions-and-result-panel
Open

test(frontend): cover the computing-unit actions service and result panel#8031
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:cov/computing-unit-actions-and-result-panel

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Two small frontend files. Measured with the identical spec-file filter on both sides (two repeated --include globs, never a test-name phrase), rm -rf coverage between runs, reading frontend/coverage/gui/lcov.info.

File Codecov metric Delta
computing-unit-actions.service.ts 26/29 = 89.7% → 29/29 = 100% +3 lines
result-panel.component.html 50/53 = 94.3% → 53/53 = 100% +3 lines

+6 fully-covered lines and +5 branch arms. The before figure on the template reproduces Codecov's published 94.3% exactly.

This is a small PR and I would rather say so than dress it up. What makes it worth having is the template's function counter.

The template's bindings were never entered

result-panel.component.html sat at FNF 7 / FNH 4 — three of its seven functions uncovered — because the existing spec called handleEndDrag(...) and handleStartDrag() directly on the component. The bindings themselves stayed at FNDA:0: covered-looking, unexercised. Driving them through the rendered element is what closes them.

That is the seventh time in this campaign a file has sat at a healthy line percentage with uncovered functions, and the second time the specific cause was a spec calling a handler directly instead of firing the binding.

Verification

18 mutations, all 18 killed.

The first draft claimed survivors: [] alongside "NO DEFECTS FOUND" and "nothing in the advertised gap was unreachable". Its own mutants were re-run against the bundle as shipped first, and several survived it; all now die.

Two further corrections to that draft:

  • An arithmetic error. It reported the service as 23/26 → 26/26. Lines 101 and 109 carry BRDA records but no DA record — v8 attributes the DA for the whole modalService.confirm({...}) statement to line 99 — so on the union(DA, BRDA) line set the correct figures are 26/29 → 29/29. Same delta, different denominator, and worth stating so the numbers reproduce.
  • A miscredited kill. One mutation's row named a single test with the second in a parenthetical "also:". Re-derived, it fails two tests outright.

One vacuity worth naming, though it is not a survivor

The pre-existing test "renders the resize handles when the panel is docked" still passes a swap of the line-120 nzDirections arm on its own, because it never distinguishes the two directions. It is not a file-level survivor — the new tests kill that mutant — but the older test does not constrain what its name suggests.

Deliberately not included

Nothing. Both files reach 100% on lines, branches and functions, and neither carries an unreachable partial — which is unusual at this point in the codebase and is why this bundle was taken at six lines when three sibling bundles at the same size were dropped.

No production file is touched. The worktree used a real yarn install rather than a node_modules junction.

Any related issues, documentation, discussions?

Closes #8030

How was this PR tested?

npx ng test --watch=false --include="**/computing-unit-actions.service.spec.ts" --include="**/result-panel.component.spec.ts"
 Test Files  2 passed (2)

yarn format:ci passes. frontend/junit.xml and frontend/coverage/ are regenerated by every run and are not committed.

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

Generated-by: Claude Code (Opus 5)

…anel

Both files reach 100% on lines, branches and functions: +6 fully-covered
lines and +5 branch arms. The before figure on the template reproduces
Codecov's published 94.3% exactly.

Small, and worth it for the function counter: result-panel.component.html
sat at FNF 7 / FNH 4 because its spec called handleEndDrag and
handleStartDrag directly on the component, leaving the template's own
bindings at FNDA:0 -- covered-looking and unexercised. Seventh time this
campaign a file has had uncovered functions behind a healthy line figure.

18 mutations, all killed. The first pass claimed no survivors alongside "NO
DEFECTS FOUND"; several of its own mutants survived it. Its arithmetic was
also wrong -- two lines carry BRDA records but no DA record, because v8
attributes the DA for the whole modalService.confirm statement to the line
above -- and one kill was credited to one test when it fails two.

Neither file carries an unreachable partial, which is why this was taken at
six lines when three sibling bundles the same size were dropped.
Copilot AI lite review requested due to automatic review settings August 27, 2026 01:07

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the frontend Changes related to the frontend GUI label Aug 27, 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:

  • Contributors with relevant context: @Ma77Ball, @mengw15
    You can notify them by mentioning @Ma77Ball, @mengw15 in a comment.

@aglinxinyuan
aglinxinyuan requested a review from mengw15 August 27, 2026 01:15
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.31%. Comparing base (9fe0657) to head (91bc950).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8031      +/-   ##
============================================
+ Coverage     93.29%   93.31%   +0.01%     
  Complexity     4678     4678              
============================================
  Files          1179     1179              
  Lines         47713    47713              
  Branches       5314     5314              
============================================
+ Hits          44515    44521       +6     
+ Misses         1732     1731       -1     
+ Partials       1466     1461       -5     
Flag Coverage Δ *Carryforward flag
access-control-service 81.00% <ø> (ø) Carriedforward from 9fe0657
agent-service 99.32% <ø> (ø) Carriedforward from 9fe0657
amber 89.42% <ø> (ø) Carriedforward from 9fe0657
computing-unit-managing-service 73.67% <ø> (ø) Carriedforward from 9fe0657
config-service 86.73% <ø> (ø) Carriedforward from 9fe0657
file-service 86.70% <ø> (ø) Carriedforward from 9fe0657
frontend 95.80% <ø> (+0.02%) ⬆️
notebook-migration-service 79.31% <ø> (ø) Carriedforward from 9fe0657
pyamber 97.78% <ø> (ø) Carriedforward from 9fe0657
workflow-compiling-service 77.19% <ø> (ø) Carriedforward from 9fe0657

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

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@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

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.

Cover the computing-unit actions service and result-panel template

4 participants