Repository navigation
test(frontend): cover HostCustomTasksTab for the v11 coverage gate - #321
Merged
Merged
Conversation
This component had zero test coverage since it was added — every branch (loading skeleton, empty state, active-gated lazy load, run success with toast/track/emitted events, canRunApt=false hiding the run button, run failure, load failure) is exercised, following the existing HostTasksTab.spec.ts mocking pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…s ts lib target vue-tsc flagged TS2550 on wrapper.emitted(...)?.at(-1) — the tsconfig's target lib predates ES2022's Array.at(). Index by length instead.
|
5 tasks done
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.



Summary
HostCustomTasksTab.vueshipped with zero test coverage (48/48 new-code lines uncovered per SonarCloud's PR #268 gate) — this is the single largest remaining gap toward the 80% new-code coverage threshold. Adds a spec exercising every branch: loading skeleton, empty state, active-gated lazy load, running a task (toast +pendingCommand.track+open-command/history-changedemits),canRunApt=falsehiding the run button, a run failure, and a load failure — following the existingHostTasksTab.spec.tsmocking pattern (api client +usePendingCommandmocked, no real WebSocket).Test plan
npx vitest run src/components/host/HostCustomTasksTab.spec.ts— 6/6 passing.