You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/08/08 01:40:04 UTC
[I] extend UserComputingUnitListItemComponent template coverage [texera]
mengw15 opened a new issue, #7411:
URL: https://github.com/apache/texera/issues/7411
### Task Summary
`UserComputingUnitListItemComponent`'s **template** is at ~64% (`user-computing-unit-list-item.component.html`, 31 uncovered lines) while its class file is already at **100%** — the handlers are unit-tested, but the row's buttons are never clicked, so their bindings stay uncovered. Bring the template to full coverage. Vitest/jsdom; see `frontend/TESTING.md`.
### Behavior to add
Extend `user-computing-unit-list-item.component.spec.ts` to exercise the row through the DOM, then run the coverage report and cover the remaining red lines. The uncovered constructs are `(click)` handlers (e.g. `openComputingUnitMetadataModal(entry)`), the inline-rename key handlers (`(keydown.escape)="cancelEditingUnitName()"`), tooltip bindings (e.g. "Share computing unit") and `*ngIf` branches.
Approach:
- Render the row with an `@Input` entry and `fixture.detectChanges()`; toggle the states the template switches on (running vs stopped, owned vs shared, editing vs display) so each `*ngIf` arm and its tooltip render.
- Fire the actions through the DOM — `By.css` query + `.triggerEventHandler("click", ...)` for the buttons, and `.triggerEventHandler("keydown.escape", ...)` for the rename cancel — and assert the injected service double (`vi.fn()`) / component state, instead of calling the methods directly.
Determinism: the component queues a `setTimeout`; **do not add `vi.useFakeTimers()` to suppress it** (a synchronous test body never runs the callback; fake timers over zone.js's patched timers are Node-version dependent and have caused CI-only failures). Never assert on layout/geometry.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] extend UserComputingUnitListItemComponent template coverage [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan closed issue #7411: extend UserComputingUnitListItemComponent template coverage
URL: https://github.com/apache/texera/issues/7411
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org