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

   ### What changes were proposed in this PR?
   
   Extends four component specs so their templates actually render, covering 
markup
   that the existing tests never executed (they drove the classes directly). No
   production code was changed.
   
   **`MarkdownDescriptionComponent`** (+5) — clicking the Edit action enters 
edit
   mode and renders the edit arm; the `[innerHTML]` block renders the parsed
   markdown; the `#noDescription` fallback renders when there is nothing to 
show;
   the view-more button toggles both ways (label and chevron are driven by the 
same
   flag); and the control is omitted when the description does not overflow.
   
   **`PresetWrapperComponent`** (+5) — the save button renders and saves; the
   dropdown's `*ngFor` list is populated per preset with the title/description 
the
   row interpolations render; the empty-list arm; and the `applyPreset` /
   `deletePreset` binding targets.
   
   **`PropertyEditorComponent`** (+2) — the docked collapse item closes the 
panel and
   the collapsed item reopens it, so both arms of the `*ngIf` pair and both 
`(click)`
   bindings execute.
   
   **`AdminExecutionComponent`** (+3) — a seeded execution renders one row whose
   cells contain `maxStringLength(...)` and `convertSecondsToTime(...)` output; 
the
   "Not Available" arm renders for a negative execution time; and the kill 
control
   routes the workflow id.
   
   Two behaviours worth noting for future template specs, recorded in comments:
   
   - `ngOnInit` refills the list-backed state from the service, so rows must be 
fed
     through the service stub rather than assigned afterwards (the fetch would
     overwrite them).
   - `nz-dropdown`'s menu only mounts into a CDK overlay on a real user open, 
which
     jsdom does not drive. Rather than asserting on markup that cannot render 
there
     (which would be brittle), those tests assert the list the `*ngFor` is 
bound to
     and the interpolations/handlers each row uses. `nz-table` also renders an
     internal measure row, which the row helper filters out.
   
   Per the issue's determinism constraints: no fake timers are introduced, no
   date/time string is asserted, and nothing asserts layout or geometry.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7496
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; failure paths 
were
   verified by breaking assertions to confirm the suites go red):
   
   ```
   ng test --watch=false --include .../markdown-description.component.spec.ts   
# 24 passed
   ng test --watch=false --include .../preset-wrapper.component.spec.ts         
# 29 passed
   ng test --watch=false --include .../property-editor.component.spec.ts        
# 22 passed
   ng test --watch=false --include .../admin-execution.component.spec.ts        
# 42 passed
   prettier --write <specs>   # clean
   eslint  <specs>            # 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