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:
81201fa9deef8ddfb2d74f70e785dce1f6128ff2 / Xinyuan Lin <[email protected]>
test(frontend): add unit tests for WorkflowRuntimeStatisticsComponent (#6580)

### What changes were proposed in this PR?

Adds a Vitest unit spec for `WorkflowRuntimeStatisticsComponent`, which
previously had no test coverage. The 9 tests cover:
- `ngOnInit` grouping stats by operator id and calling `Plotly.newPlot`
once (metric 0), asserting the `(chartId, dataset, layout)` args.
- the undefined-statistics guard (warns, no plot).
- `groupStatisticsByOperatorId`: nanosecond-to-second conversion,
timestamps made relative to the first stat, grouping repeated operator
ids, and skipping stats missing an operator id.
- `createDataset`: sink-operator removal and
`<operatorName>-<last6ofId>` series naming with `x = timestamp / 1000`.
- `onTabChanged` re-plotting with metric-specific y-values (input-count
vs worker-count).
- `createChart` warn-and-skip when the dataset is empty (sink-only and
empty-stats).

`Plotly` (`plotly.js-basic-dist-min`) is mocked; `NZ_MODAL_DATA`
supplies the fixtures.

### Any related issues, documentation, discussions?

Closes #6577.

### How was this PR tested?

`npx ng test --watch=false
--include='**/workflow-runtime-statistics.component.spec.ts'` -> 9/9
passing. `yarn format:ci` passes.

### 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/29721522977

With regards,
GitHub Actions via GitBox

Reply via email to