test(frontend): cover the admin-execution and user-dataset templates - #7893
Open
aglinxinyuan wants to merge 1 commit into
Open
test(frontend): cover the admin-execution and user-dataset templates#7893aglinxinyuan wants to merge 1 commit into
aglinxinyuan wants to merge 1 commit into
Conversation
77 tests to 94. admin-execution.component.html goes 93.9% to 98.8% and user-dataset.component.html reaches 100% lines and branches: +9 fully covered lines, +2 arms. Both baselines reproduce Codecov exactly. 29 mutations, 28 killed. The first pass reported no survivors while 17 distinct mutants survived on its own tree -- its numbers were right and its assertions were not, and three of its test comments described separations the tests did not achieve. Stated in the PR rather than implied: this is not a claim that the templates are mutation-complete, only about 29 specific mutants. Five wirings remain unpinned and are listed, including two whose handlers the existing suites call directly so the bindings themselves never fire, and one left unpinned deliberately because pinning it would cement a duplicate-subscription defect. The last remaining Codecov miss is dead markup -- a template ref declared twice.
Contributor
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7893 +/- ##
============================================
+ Coverage 92.09% 92.21% +0.12%
Complexity 4533 4533
============================================
Files 1173 1173
Lines 47347 47347
Branches 5306 5306
============================================
+ Hits 43604 43661 +57
+ Misses 2105 2069 -36
+ Partials 1638 1617 -21
*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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Two dashboard templates. 77 tests → 94.
Measured from
frontend/withng test --coverage --coverage-reporters=lcovonly, the same spec-file filter on both sides,rm -rf coveragebetween runs, and the "before" run taken from HEAD's specs rather than inherited from a report.admin-execution.component.htmluser-dataset.component.html+9 fully-covered lines, +2 branch arms. Both "before" figures reproduce Codecov's published numbers exactly.
New tests cover the duration and end-time fallbacks, the filter and pagination wiring, and the dataset list's empty and populated states.
Verification
29 mutations, 28 killed, 1 equivalent mutant. Every mutant was run twice — once against the pre-review tree and once against the repaired tree — so the "now dies" claims are differences I observed rather than inferred.
The first draft reported
"survivors": []. That was false: 17 distinct mutants survived at 87/87 on its own tree. Its numbers were right — I reproduced 93.90%/5-missed, 86.49%/5-missed, +9 lines and +2 arms — but its closing claim that "the assessment was accurate on every number I checked" papered over the fact that the assertions behind those numbers did not constrain much.Three of its test comments described separations the tests did not achieve:
ngIfguard was in fact pinned in only one direction.EXCHANGEof the pause and resume[disabled]predicates was framed as pinning the pair; it pins only pause-on-RUNNING and resume-on-PAUSED, not the converse.This repair pass added zero coverage
The 7 new tests and 7 strengthenings buy mutation strength, not lines — the Codecov delta is identical before and after this pass. Said plainly so the diff size is not read as coverage.
Deliberately not included, and honestly bounded
This is not a claim that these templates are mutation-complete. It is a claim about 29 specific mutants. Five wirings remain unpinned and are listed rather than hidden:
(nzQueryParams)on line 43 and(nzFilterChange)on line 83 ofadmin-execution.component.htmlare both stillFNDA:0. Deleting either would silently break every page click or filter change and nothing in the 53 tests would notice, because the pagination and filter suites call the handlers directly. Worth 0 Codecov lines either way.(click)="setViewType('card')"onuser-dataset.component.html:53is stillFNDA:0— the page starts in card view, so the existing toggle test only ever clicks the list button.(refresh)="ngAfterViewInit()"on line 100 is left unpinned deliberately: pinning it would cement a duplicate-subscription defect.(refresh)has noDArecord in the lcov at all, so it can never count toward the Codecov metric in either direction.admin-execution.component.html:128is the one remaining miss and it is dead markup:#endTimeNotAvailableis declared twice, at lines 118 and 127, so lines 127-129 are unreachable. Re-verified from my own after-run lcov rather than inherited.No production file is touched.
Any related issues, documentation, discussions?
Closes #7892
How was this PR tested?
frontend/junit.xmlandfrontend/coverage/are regenerated by every run and are not committed.yarn format:cipasses.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)