Skip to content

Cover the console frame's controls and the preset service's guards #7732

Closed

Description

@aglinxinyuan

Task Summary

Two small frontend targets, both live and both partly untested:

File Coverage
workspace/service/preset/preset.service.ts 91.7% lines, 6 missed + 4 partial
workspace/component/result-panel/console-frame/console-frame.component.html 93.5% lines, 6 missed — and 0 of 8 branches, 5 of 9 functions

The template's branch and function figures are the real gap; its line percentage hides it.

Worth establishing before writing anything, because both guesses turn out to be wrong in instructive ways:

  • preset.service.ts is live, not another workflow-snapshot.service.ts. It is injected by preset-wrapper.component.ts and operator-property-edit-frame.component.ts, and its user/config endpoint is served by UserConfigResource.scala.
  • The template is NOT an Template coverage does not register for components whose spec calls TestBed.overrideComponent #7458 case. The existing spec uses imports: [ConsoleFrameComponent, ...] with no overrideComponent, and the coverage map proves bindings execute counted — the *ngFor statement shows 124 hits. This is a partly-untested template, not a lost source map, so the remedy is to extend the existing TestBed rather than append a fresh one.

Traps here:

  1. The settings dropdown's menu is projected into a CDK overlay wired in ngAfterViewInit behind an auditTime(150). The fixture must be created inside fakeAsync — created in a plain beforeEach, the timers escape tick() and the overlay never attaches, so a test asserting on its contents finds zero elements and can be written to "pass" vacuously.
  2. Toggling two switches off at once hides a swap. Asserting timestamp and source independently is what makes an exchange of their [(ngModel)] bindings detectable.
  3. Four uncovered items are unreachable and should be left alone — see below; two of them are production defects, and a test would cement them.

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Activity

  1. added a commit that references this issue on Aug 18, 2026
    958264a
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