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


##########
superset-frontend/plugins/plugin-chart-pivot-table/test/plugin/transformProps.test.ts:
##########
@@ -39,250 +82,256 @@ describe('PivotTableChart transformProps', () => {
     colTotals: true,
     rowTotals: true,
     valueFormat: 'SMART_NUMBER',
+    data: [{ name: 'Hulk', sum__num: 1, __timestamp: 599616000000 }],
+    setDataMask,
+    selectedFilters: {},
+    verboseMap: {},
     metricsLayout: MetricsLayoutEnum.COLUMNS,
-    viz_type: '',
-    datasource: '',
-    conditionalFormatting: [],
-    dateFormat: '',
-    legacy_order_by: 'count',
-    order_desc: true,
+    metricColorFormatters: [],
+    dateFormatters: {},
+    emitCrossFilters: false,
+    columnFormats: {},
+    currencyFormats: {},
     currencyFormat: { symbol: 'USD', symbolPosition: 'prefix' },
+  });

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Test assertion mismatch</b></div>
   <div id="fix">
   
   The test assertion uses toEqual with a partial expected object, which will 
fail because transformProps returns additional properties (e.g., colSubTotals, 
rowSubTotals, currencyCodeColumn, detectedCurrency, onContextMenu, 
timeGrainSqla, allowRenderHtml). Use toMatchObject for partial matching 
instead. Also, emitCrossFilters is undefined in chartProps but expected as 
false, so add it to chartProps to match.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #6c8d38</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