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


##########
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:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicated test setup code</b></div>
   <div id="fix">
   
   Syntactic duplication detected in test file. Code snippets at lines 
2640-2656 and 2735-2751 share 17 lines of identical syntax. Additionally, code 
at lines 2628-2644 and 2666-2682 share similar patterns. Consider extracting 
the duplicated chartProps setup into a reusable helper function to eliminate 
redundancy and improve maintainability.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #fdec25</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



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