mengw15 opened a new issue, #7361:
URL: https://github.com/apache/texera/issues/7361

   ### Task Summary
   
   `ResultExportationComponent`'s **template** is at ~40% 
(`result-exportation.component.html`, 39 uncovered lines) while its class file 
is already at **100%** — the handlers are unit-tested, but most of the dialog 
never renders, so its bindings and conditional blocks stay unexecuted. Bring 
the template to full coverage. Vitest/jsdom; see `frontend/TESTING.md`.
   
   ### Behavior to add
   
   Extend `result-exportation.component.spec.ts` so each template branch 
renders, then run the coverage report and cover the remaining red lines. The 
uncovered constructs are the blocking-dataset `nz-alert` block, `[(ngModel)]` 
bindings (e.g. `exportType`), `*ngFor` lists and `(click)` handlers.
   
   Approach:
   - `fixture.detectChanges()` after each state change — it is the 
template-coverage switch.
   - Put the component in the states the template switches on: with and without 
blocking datasets (so the `nz-alert` renders and `blockingDatasetSummary` is 
bound), each supported export type, and a populated operator list so the 
`*ngFor` expands.
   - Drive the actions through the DOM — 
`fixture.debugElement.query(By.css("..."))` + `.triggerEventHandler("click", 
...)` — rather than calling the handlers directly; assert the injected service 
double (`vi.fn()`) was called.
   
   Assert on rendered text / element presence / the state a binding writes — 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to