mengw15 opened a new issue, #7362:
URL: https://github.com/apache/texera/issues/7362
### Task Summary
`UserWorkflowComponent`'s **template** is at ~53%
(`user-workflow.component.html`, 35 uncovered lines) while its class file is
already at **100%**. The spec exercises the class but leaves much of the
toolbar/list markup unrendered. Bring the template to full coverage.
Vitest/jsdom; see `frontend/TESTING.md`.
### Behavior to add
Extend `user-workflow.component.spec.ts` so each template branch renders,
then run the coverage report and cover the remaining red lines. The uncovered
constructs are `(click)` handlers (e.g. `toggleSelection()` and the
multi-select toolbar actions), `[nz-tooltip]` bindings, and `[(ngModel)]`
bindings.
Approach:
- `fixture.detectChanges()` after each state change.
- Toggle the states the template switches on: nothing selected vs one vs
several workflows selected (so the multi-select buttons and their tooltips
render and enable/disable), list vs grid view, empty vs populated result set.
- Fire the actions through the DOM (`By.css` query +
`triggerEventHandler("click", …)`) and assert the service double / emitted
event, instead of calling the handler methods directly.
The spec already imports `NoopAnimationsModule` — keep it. Assert on
rendered text / element presence / bound state, never on layout or 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]