Skip to content

test(frontend): cover HostCustomTasksTab for the v11 coverage gate - #321

Merged
Rem7474 merged 2 commits into
devfrom
test/host-custom-tasks-tab-coverage
Aug 29, 2026
Merged

Rem7474 merged 2 commits into
devfrom
test/host-custom-tasks-tab-coverage

Conversation

@Rem7474

@Rem7474 Rem7474 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Summary

HostCustomTasksTab.vue shipped 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-changed emits), canRunApt=false hiding the run button, a run failure, and a load failure — following the existing HostTasksTab.spec.ts mocking pattern (api client + usePendingCommand mocked, no real WebSocket).

Test plan

  • npx vitest run src/components/host/HostCustomTasksTab.spec.ts — 6/6 passing.

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.
@sonarqubecloud

Copy link
Copy Markdown

@Rem7474
Rem7474 merged commit 2818a19 into dev Aug 29, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant