The GitHub Actions job "Required Checks" on texera.git/main has succeeded. Run started by GitHub user github-merge-queue[bot] (triggered by github-merge-queue[bot]).
Head commit for run: dfb9400176f6b4263b95daf1ed965e2e37253d78 / Meng Wang <[email protected]> test(frontend): extend AdminExecutionComponent coverage for helpers, data, table and actions (#6554) ### What changes were proposed in this PR? Extends the existing `AdminExecutionComponent` spec (previously ~43% coverage) to cover the untested helpers, data flow, table handlers and execution actions. 20 added tests, in a new describe block that mocks `AdminExecutionService` and does **not** call `detectChanges()` (so `ngOnInit`'s pollers never start): - **Pure helpers** — `padZero`, `convertSecondsToTime`, `maxStringLength`, `getStatusColor` (incl. the default), `convertTimeToTimestamp`, and `calculateTime` (both the fixed-duration and the live-elapsed branches). - **Time status** — `specifyCompletedStatus` (COMPLETED→JUST COMPLETED within 5s and the reverse after 5s), `updateTimeDifferences`, `updateTimeStatus` (delegation), and `dataCheck`. - **Data / table** — `fetchData` (populates list/total/loading), `onFilterChange`, and `onSortChange` (set + reset-to-`NO_SORT`). - **Actions** — `killExecution` / `pauseExecution` / `resumeExecution` (open the socket for the workflow and send the right request, then refresh) and `clickToViewHistory` (opens the history modal). **Determinism (no flaky tests):** the `Date.now()`-based methods run under `vi.useFakeTimers()` + a fixed `setSystemTime`; `convertTimeToTimestamp` is asserted against the same `toLocaleString` call so it is timezone-independent; the websocket-based actions spy `WorkflowWebsocketService.prototype` `openWebsocket`/`send` (so no real socket opens and the constructor's heartbeat interval never fires under fake timers); `fixture.destroy()` runs in `afterEach`. Verified locally: 30/30 pass, **10 consecutive runs with zero flakes**, and the failure path checked. No production code was changed. ### Any related issues, documentation, discussions? Closes #6550 ### How was this PR tested? Extended unit tests, run locally in `frontend/`: ``` ng test --watch=false --include src/app/dashboard/component/admin/execution/admin-execution.component.spec.ts # Test Files 1 passed (1) | Tests 30 passed (30) (10x consecutive, 0 flakes) prettier --write <spec> # unchanged eslint <spec> # clean ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) Report URL: https://github.com/apache/texera/actions/runs/29709107494 With regards, GitHub Actions via GitBox
