Skip to content

Add unit test coverage for the share-access, card-item and list-item dashboard components #8131

Closed

Description

@aglinxinyuan

Task Summary

Four dashboard components carry unexercised template wiring and guard paths:

File Codecov fully-covered
share-access.component.ts 159/169
share-access.component.html 66/73
card-item.component.ts 181/190
user-workflow-list-item.component.ts 36/41
user-model.component.ts 79/82
user-model.component.html 30/34

The gaps are ordinary: unentered *ngIf arms, click and keyboard handlers no test dispatches, and error branches on the access-sharing calls.

Two measurement traps are worth recording before anyone starts.

workspace.component.html shows 0 of 14 lines and looks like the biggest target in the frontend. It is not reachable: workspace.component.spec.ts calls TestBed.overrideComponent(...), which forces a JIT recompile and discards the instrumented AOT template, so every statement reads zero on a fully green run. Unblocking it means mounting eight child components with 62 constructor dependencies between them, including JointJS and Monaco — and that suite already OOMs workers at 2 GB (#7975).

Second, Angular's generated listener source-spans chain from the end of the previous listener attribute, so a zero-hit line in an .html file is often not the handler written on that line. card-item.component.html:105 reads as a (keydown.enter) binding that an existing test already dispatches; the actual zero statement there is the (click)="$event.stopPropagation()" handler. Plan from the istanbul statementMap, never from the template text.

Task Type

  • Testing / QA

Was this issue authored using generative AI tooling?

Generated-by: Claude Code (Opus 5)

Activity

  1. added a commit that references this issue on Aug 31, 2026
    7ba7b98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions