Repository navigation
Description
Task Summary
Two workspace editor sub-components whose specs stop early:
| File | Missed | Coverage | Existing spec |
|---|---|---|---|
codearea-custom-template.component.ts |
11 | 64.5% | one "should create" test |
breakpoint-condition-input.component.ts |
10 | 63.9% | condition + keyboard paths only |
CodeareaCustomTemplateComponent's actual job is keeping one shared, per-operator "is the editor open" flag in sync across three inputs — this component opening or closing the editor, a co-editor opening the same one remotely, and the component being torn down while the editor is still up. The flag lives in CodeEditorService keyed by operator id, so a mix-up silently reopens the wrong operator's editor. Also worth pinning that ngOnDestroy persists the current flag rather than a hardcoded false, and that the created editor receives this field's form control rather than a fresh one.
One trap: the component subscribes to the co-editor stream in its constructor, and getCoeditorOpenedCodeEditorSubject() returns asObservable(). So a co-editor test has to stub the getter before the component is built — casting its result back to a Subject only works by accident of the current implementation.
BreakpointConditionInputComponent's popup has no layout of its own; it is positioned by arithmetic over Monaco's reported geometry, and none of left(), top(), isVisible or the css offsets written by ngOnChanges is tested. The existing stub already supplies distinguishable non-zero values, so expectations can be specific numbers rather than the zeros jsdom would produce anyway. Both no-editor and no-line guards are uncovered, as is the horizontal scroll offset that only left() reads.
Note Vitest has no toBeTrue/toBeFalse — those are Jasmine matchers and fail to typecheck here.
code-debugger.component.ts (20 missed) is deliberately out of scope: its spec already has 16 tests covering the decoration and status-change handlers, and the residue looks like it would need padding rather than real assertions.
Task Type
- Refactor / Cleanup
- DevOps / Deployment / CI
- Testing / QA
- Documentation
- Performance
- Other
Activity
test(frontend): cover the codearea template and breakpoint popup plac…