The GitHub Actions job "Required Checks" on texera.git/main has failed. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: e75562e2195ca1601262d6c92bff284cb4d71ffd / Meng Wang <[email protected]> test(frontend): add unit test coverage for AgentRegistrationComponent (#6520) ### What changes were proposed in this PR? Adds a behavior-focused Vitest spec for `AgentRegistrationComponent` (`frontend/src/app/workspace/component/agent/agent-panel/agent-registration/agent-registration.component.ts`), previously without a spec (~11.5% coverage). `AgentService`, `NotificationService`, `WorkflowActionService`, and `ComputingUnitStatusService` are stubbed; the component renders with `detectChanges()`. 13 tests cover: - `should create`, template renders, and `customAgentName` defaults to `"Texera Agent"`. - `ngOnInit` — loads the fetched model types and clears `isLoadingModels`; flags `hasLoadingError` + notifies when no models are returned; flags the error + notifies when the fetch fails; and sets `computingUnitConnected` only when the status is `Running`. - `selectModelType` updates `selectedModelType`. - `createAgent` — emits `agentCreated` with the new id and resets the form on success; forwards the model, name (or `undefined` when blank), and workflow id to the service; is a no-op when no model is selected or a creation is already in progress; and notifies + clears `isCreating` on failure. - `canCreate` requires a selected model, an idle form, and a connected computing unit. No production code was changed. ### Any related issues, documentation, discussions? Closes #6514 ### How was this PR tested? New unit tests, run locally in `frontend/` (all green; the failure path was verified by deliberately breaking the `agentCreated` emit assertion to confirm the suite goes red): ``` ng test --watch=false --include src/app/workspace/component/agent/agent-panel/agent-registration/agent-registration.component.spec.ts # Test Files 1 passed (1) | Tests 13 passed (13) prettier --write <spec> # formatted eslint <spec> # clean ``` All four services are stubbed, so the suite makes no network calls (see `frontend/TESTING.md`). ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) --------- Signed-off-by: Meng Wang <[email protected]> Co-authored-by: Copilot Autofix powered by AI <[email protected]> Report URL: https://github.com/apache/texera/actions/runs/29665527855 With regards, GitHub Actions via GitBox
