bito-code-review[bot] commented on code in PR #43113:
URL: https://github.com/apache/superset/pull/43113#discussion_r3964534131


##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts:
##########
@@ -2625,3 +2625,186 @@ describe('tooltip for metrics whose labels end in 
forecast suffixes', () => {
     expect(html).toContain('>ci<');
   });
 });
+test('tooltip formats each series with its own metric format instead of the 
default formatter', () => {
+  // Two saved metrics with different formats: `pct_change` carries a 
percentage
+  // D3 format, `count` carries a currency format. The series labels already
+  // honor each metric's format; the tooltip must do the same.
+  const chartProps = createTestChartProps({
+    formData: {
+      metrics: ['count', 'pct_change'],
+      richTooltip: true,
+    },
+    queriesData: [
+      createTestQueryData(
+        [{ count: 1000, pct_change: 0.1234, __timestamp: BASE_TIMESTAMP }],
+        { label_map: { count: ['count'], pct_change: ['pct_change'] } },

Review Comment:
   <!-- Bito Reply -->
   The reviewer's suggestion to extract duplicated test setup code is noted. 
Given the project's preference for flat, self-contained tests to ensure 
readability and independence, maintaining the current structure is an 
acceptable trade-off. No further action is required on this suggestion.



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