The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).

Head commit for run:
f0e17c27d72f1b968ea3676a17bd3c1510f1dd53 / Yicong Huang 
<[email protected]>
test(amber): add unit tests for visualization OpDescs (HeatMap, BarChart, 
LineChart, PieChart) (#4812)

### What changes were proposed in this PR?

Adds scalatest coverage for four more visualization operator
descriptors. New specs for `HeatMapOpDesc` and `LineChartOpDesc`;
existing thin `BarChart` and `PieChart` specs are extended with the same
shape used in the previous bundle (#4809).

Each spec covers `operatorInfo` (name + group + outputPort count),
`getOutputSchemas` (single-port `html-content` STRING),
`generatePythonCode` (operator class + plotly imports +
`decode_python_template` runtime decode-site count for each
`EncodableString`), and the missing-required-field behavior — which
differs by OpDesc:

- `HeatMap` asserts on `x`, `y`, `value` (all three).
- `BarChart` asserts on `value` and `fields` with explicit messages
("Value column cannot be empty" / "Fields cannot be empty").
- `PieChart` asserts only on `value` — `name` has no guard, so an
empty-name configuration still renders.
- `LineChart` has no asserts but its `lines` field defaults to `null`;
calling `generatePythonCode` on a default-constructed instance raises
`NullPointerException` (see Bug filed below).

### Any related issues, documentation, discussions?

Closes #4810.

Bug filed separately: `LineChartOpDesc.generatePythonCode` throws
`NullPointerException` when `lines` is left at its `null` default,
instead of raising `AssertionError` like the other visualizers or
rendering an empty chart.

### How was this PR tested?

```
sbt scalafmtCheckAll
sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.visualization.heatMap.HeatMapOpDescSpec 
org.apache.texera.amber.operator.visualization.barChart.BarChartOpDescSpec 
org.apache.texera.amber.operator.visualization.lineChart.LineChartOpDescSpec 
org.apache.texera.amber.operator.visualization.pieChart.PieChartOpDescSpec"
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-4-7)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/25286929533

With regards,
GitHub Actions via GitBox

Reply via email to