mengw15 opened a new pull request, #7365:
URL: https://github.com/apache/texera/pull/7365

   ### What changes were proposed in this PR?
   
   Extends `ResultExportationComponent`'s spec so the **template** actually 
renders
   each of its branches. The class was already fully unit-tested, but the 
existing
   tests drive the class directly and never render most of the dialog, leaving 
its
   `*ngIf` / `*ngFor` / `(click)` / `[(ngModel)]` constructs unexecuted. No
   production code was changed.
   
   6 tests, each putting the component in a state the template switches on and 
then
   calling `detectChanges()`:
   
   - the restricted-export error `nz-alert` (every operator blocked);
   - the partial-skip warning `nz-alert` (some but not all operators blocked);
   - the export-type `nz-select` and its output-gated `nz-option` arms
     (`isTableOutput` / `isVisualizationOutput` / `containsBinaryData`);
   - the filename input when `exportType === "data"`;
   - the local **Export** button — driven through the DOM
     (`triggerEventHandler("click")`) and asserting the export service double 
was
     called with the `local` destination;
   - the dataset destination — the search input's `(input)` handler, the
     `*ngFor` dataset list, and the **Create New Dataset** button (asserts the
     modal-service double opens the creator).
   
   Per the component's determinism notes: no fake timers, no layout/geometry
   assertions, and no timezone-sensitive date assertions — the tests assert on
   rendered text, element presence, and the injected service doubles.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7361
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; the failure path 
was
   verified by breaking an assertion to confirm the suite goes red):
   
   ```
   ng test --watch=false --include 
src/app/workspace/component/result-exportation/result-exportation.component.spec.ts
   # Test Files 1 passed (1) | Tests 26 passed (26)
   prettier --write <spec>   # clean
   eslint  <spec>            # clean
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [1M context])
   


-- 
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