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

   ### What changes were proposed in this PR?
   
   Extends the existing specs for two components (both asserted little past
   creation) with unit tests for their previously-untested methods, per
   `frontend/TESTING.md`.
   
   **`UserWorkflowListItemComponent`** (codecov ~62%) — 11 new tests:
   - `getProjectIds` returns the entry's project-id set; `isLightColor` reports
     light vs dark hex colors.
   - `confirmUpdateWorkflowCustomName` / 
`confirmUpdateWorkflowCustomDescription`
     persist via `WorkflowPersistService`, update the workflow, and stop 
editing;
     the name falls back to the default when empty; both no-op when the workflow
     has no id.
   - `removeWorkflowFromProject` calls `UserProjectService` and prunes the 
entry's
     project ids; `onClickGetWorkflowExecutions` opens the execution-history 
modal;
     `onClickDownloadWorkfllow` delegates to `DownloadService` (and no-ops 
without
     an id).
   
   **`BrowseSectionComponent`** (codecov ~72%) — 4 new tests:
   - `initializeEntry` skips entries whose id is not a number and throws on an
     unexpected entity type.
   - `loadCoverImages` / `getCoverImage` build and cache 
`${apiEndpoint}/dataset/{id}/cover`
     for a dataset with a cover image, and fall back to the default background 
otherwise.
   
   No production code was changed.
   
   ### Any related issues, documentation, discussions?
   
   Closes #6590
   
   ### How was this PR tested?
   
   Extended Vitest specs, run locally in `frontend/` (each whole file green, 
run 4×
   to confirm determinism; failure paths verified by breaking an assertion in 
each):
   
   ```
   ng test --watch=false --include 
.../user-workflow-list-item.component.spec.ts   # 15 passed
   ng test --watch=false --include .../browse-section.component.spec.ts         
   # 9 passed
   eslint <specs>     # clean
   prettier --check   # clean
   ```
   
   Services are stubbed (`vi.spyOn` / `useValue`), so the specs make no network
   calls. The list-item tests that mutate a workflow (rename, 
remove-from-project)
   use a freshly-constructed `DashboardEntry` per test so mutations cannot leak 
into
   the shared `testWorkflowEntries` fixture.
   
   ### 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