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


##########
superset-frontend/src/explore/components/controls/CurrencyControl/CurrencyControl.test.tsx:
##########
@@ -26,7 +26,7 @@ test('CurrencyControl renders position and symbol selects', 
() => {
       useRedux: true,
       initialState: {
         common: { currencies: ['USD', 'EUR'] },
-        explore: { datasource: {} },
+        explore: { present: { datasource: {} }, future: [], past: [] },

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Inconsistent test state structure</b></div>
   <div id="fix">
   
   The second test in this file still uses the old explore state structure { 
datasource: {} }, while the first test (and the actual app state) uses the 
undoable structure { present: { datasource: {} }, future: [], past: [] }. This 
inconsistency could cause the component's selector for currency_code_column to 
fail in the second test, as it accesses state.explore.present.datasource.
   </div>
   
   
   <details>
   <summary>
   <b>Code suggestion</b>
   </summary>
   <blockquote>Check the AI-generated fix before applying</blockquote>
   <div id="code">
   
   
   ```
    -        explore: { datasource: {} },
    +        explore: { present: { datasource: {} }, future: [], past: [] },
   ```
   
   </div>
   </details>
   
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #3eaf57</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