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


##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -722,4 +722,41 @@ describe('legend sorting', () => {
       'Boston',
     ]);
   });
+
+  it('should set hideOverlap to false for time-based x-axis', () => {
+    const chartProps = new ChartProps(chartPropsConfig);
+    const transformed = transformProps(
+      chartProps as EchartsTimeseriesChartProps,
+    );
+
+    expect(transformed.echartOptions.xAxis).toEqual(
+      expect.objectContaining({
+        axisLabel: expect.objectContaining({
+          hideOverlap: false,
+        }),
+      }),
+    );
+  });
+
+  it('should set hideOverlap to true for categorical x-axis', () => {
+    const categoricalFormData = {
+      ...formData,
+      xAxisForceCategorical: true,
+    };
+    const chartProps = new ChartProps({
+      ...chartPropsConfig,
+      formData: categoricalFormData,
+    });
+    const transformed = transformProps(
+      chartProps as EchartsTimeseriesChartProps,
+    );
+
+    expect(transformed.echartOptions.xAxis).toEqual(
+      expect.objectContaining({
+        axisLabel: expect.objectContaining({
+          hideOverlap: true,
+        }),
+      }),
+    );
+  });

Review Comment:
   These tests are placed inside the `legend sorting` describe block but they 
test x-axis label behavior, not legend sorting. Consider either:
   1. Moving these tests outside the `legend sorting` describe block to be at 
the top level with other general tests
   2. Creating a new describe block like `describe('x-axis label behavior', () 
=> {...})` for better test organization



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