Repository navigation
test(frontend): close the branch arms left in the dataset explorer components - #7833
Merged
aglinxinyuan merged 1 commit intoAug 22, 2026
Merged
Conversation
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 #7833 +/- ##
============================================
+ Coverage 91.50% 91.55% +0.04%
Complexity 4501 4501
============================================
Files 1177 1175 -2
Lines 47489 47368 -121
Branches 5324 5310 -14
============================================
- Hits 43457 43366 -91
+ Misses 2366 2355 -11
+ Partials 1666 1647 -19
*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:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
frontend/src/app/dashboard/component/user/user-dataset/user-dataset-explorer/dataset-detail.component.spec.ts:404
- Passing
vi.fn()here bypasses the real re-drop path this test claims to cover.onNewUploadFilesChangedpassescontinueWithUploadas this callback; that callback callscancelExistingUploadagain while the original task is still"initializing"(the task is marked"aborted"only after the callback), so a real re-drop can recurse instead of starting a replacement. Please driveonNewUploadFilesChanged([makeFileItem("b.txt")])and assert that the replacement starts and the old task is aborted.
const onCanceled = vi.fn();
component.cancelExistingUpload("b.txt", onCanceled);
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?
Test-only. No production file changes.
Both templates here reached 100% in merged PRs #7681 and #7772, which lifted these
.tsfiles as a side effect — so what remained was branch arms and uncalled handlers rather than whole untested regions. Measured with istanbul JSON from--coverage --coverage-reporters=json, one spec at a time, identical--includefilter for the before and after runs:dataset-detail.component.tsIn the Codecov framing used in the issue: 5 missed lines + 24 partial → 2 missed + 9 partial. 15 of the 24 partial lines are now fully covered. Closed 3 of 5 missed statement lines, 16 of 26 missed branch arms, and 5 of 5 missed functions. Its template is re-confirmed at 455/455 statements and 46/46 branch arms, so nothing was added there.
user-dataset-version-creator.component.tsCodecov framing: 5 missed + 2 partial → 1 missed + 0 partial.
Tests 188 → 214: dataset-detail 173 → 192, version-creator 15 → 18, plus the repair round below.
An honest correction to the second target's count
The assessment called it 5 lines + 2 arms. The real closable count is 4 statements + 2 arms + 1 function, because one of its 5 missed lines is dead code:
get formControlNames(): string[]. A repo-wide grep returns exactly one hit — its own declaration — with no template and no TypeScript reference. It is left uncovered deliberately rather than cemented; deleting the getter belongs in a separate production PR.Verification
Review raised 14 findings across two lenses; the repair round took the suite to 214 and every accepted finding was proved by running the reviewer's proposed mutation first, then re-running after the fix to confirm it dies on the named test.
Neither file is an instance of #7458 — no
TestBed.overrideComponentin either spec, which the non-zero starting percentages already implied.One earlier misdiagnosis was deliberately not re-reported:
dataset-detail.component.html:593's[disabled]binding does work.NgModelroutes it throughcontrol.disable(), deferred to a microtask, so the DOM lags one turn behinddetectChanges()— asserting immediately reads a stale value and looks like an inert binding.Any related issues, documentation, discussions?
Closes #7832
How was this PR tested?
yarn format:ciexits 0; nojunit.xmlleft behind.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5)