Copilot commented on code in PR #42371:
URL: https://github.com/apache/superset/pull/42371#discussion_r3849756938


##########
superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/transformProps.test.ts:
##########
@@ -166,3 +166,56 @@ test('hide totals', () => {
     ['-', '-'],
   ]);
 });
+
+const buildAxes = (extraFormData: Record<string, unknown>) => {
+  const chartProps = new ChartProps({
+    formData: { ...formData, ...extraFormData },
+    width: 800,
+    height: 600,
+    queriesData: [{ data }],
+    theme: supersetTheme,
+  });
+  const transformedProps = transformProps(
+    chartProps as unknown as EchartsWaterfallChartProps,
+  );
+  return {
+    xAxis: transformedProps.echartOptions.xAxis as any,
+    yAxis: transformedProps.echartOptions.yAxis as any,
+    grid: transformedProps.echartOptions.grid as any,
+  };

Review Comment:
   New tests add additional `as any` casts when extracting `xAxis`, `yAxis`, 
and `grid`. The codebase is trending away from `any`; using a minimal 
structural type for the specific fields under test (e.g., `{ show?: boolean }` 
for axes and `{ left?: number; bottom?: number }` for grid) would keep the 
tests type-safe and easier to refactor.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to