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/09 15:17:03 UTC
[I] extend HuggingFaceImageUploadComponent template coverage [texera]
mengw15 opened a new issue, #7467:
URL: https://github.com/apache/texera/issues/7467
### Task Summary
`HuggingFaceImageUploadComponent`'s **template** is at ~39% (`hugging-face-image-upload.component.html`, 11 uncovered lines of 51) while its class file is already at **100%** — the handlers are unit-tested, but the preview panel never renders, so its bindings stay uncovered. Bring the template to full coverage. Vitest/jsdom; see `frontend/TESTING.md`.
### Behavior to add
Extend `hugging-face-image-upload.component.spec.ts` so the preview branch renders, then run the coverage report and cover the remaining red lines. The gap is the selected-image panel: the `<img [src]="previewSrc">`, the `hf-image-meta` block with `{{ displayFileName || "Selected image" }}`, and the `(click)="clearImage(fileInput)"` button.
Approach:
- Put the component in the "image selected" state (set `previewSrc` / `displayFileName` through the same path the component uses) and `fixture.detectChanges()` so the preview panel renders.
- Assert the `img`'s bound `src` and the displayed name, plus the fallback text when `displayFileName` is empty ("Selected image").
- Click the clear button via `fixture.debugElement.query(By.css("..."))` + `.triggerEventHandler("click", ...)` and assert `clearImage` reset the preview state (the panel disappears after a further `detectChanges()`).
Assert on rendered attributes/text — not on layout or geometry (zeros under jsdom).
### 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 HuggingFaceImageUploadComponent template coverage [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #7467: extend HuggingFaceImageUploadComponent template coverage
URL: https://github.com/apache/texera/issues/7467
--
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