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

   ### What changes were proposed in this PR?
   
   Extends three existing Vitest specs to cover previously-untested methods
   (each component/service already had a spec). No production code was changed.
   
   **`CardItemComponent`** (+13 tests) —
   - `initializeEntry`: workflow (owner→workspace link, counts, 
`disableDelete`),
     project (link + container icon + cover reset), file (folder-open icon), and
     the unexpected-type throw.
   - `onEditName` / `onEditDescription`: snapshot the original + enter edit 
mode;
     the focus `setTimeout` is driven deterministically with `fakeAsync`/`tick`.
   - `openDetailModal`: opens the modal and bumps the view count; defaults
     `wid` to 0 and skips the count fetch when `wid`/the modal instance is 
absent.
   - `toggleLike`: like/unlike + count refresh; no-ops on failure, missing user,
     or missing entry id.
   
   **`ComputingUnitStatusService`** (+8 tests) —
   `getAllComputingUnits` (replay + forward), `getSelectedComputingUnitValue`
   (null → selected), `getStatus` (null/Running/Pending/default → enum), and
   `refreshComputingUnitList` (re-fetches and pushes to subscribers).
   
   **`FilesUploaderComponent`** (+3 tests) —
   `showFileUploadBanner` (sets flag/type/message, overwrites) and `hideBanner`
   (clears only the finished flag).
   
   All collaborators are stubbed (`vi.spyOn` on injected `HubService`/
   `NzModalService`, the managing-service stub, synchronous `of(...)`); no 
backend,
   no real modal, no wall-clock/timer dependence.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6553
   
   ### How was this PR tested?
   
   Extended unit tests, run locally in `frontend/` (all green; failure paths
   verified by breaking assertions to confirm the suites go red):
   
   ```
   ng test --watch=false --include <each spec>
   # files-uploader        8 passed  (5 existing + 3 new)
   # computing-unit-status 13 passed (5 existing + 8 new)
   # card-item             46 passed (33 existing + 13 new)
   eslint <specs>       # clean
   prettier --check     # 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