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


##########
superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx:
##########
@@ -626,6 +629,7 @@ describe('Additional actions tests', () => {
     const props = createProps();
     render(<ExploreHeader {...props} />, {
       useRedux: true,
+      initialState: { explore: { can_overwrite: true, can_add: true } },
     });

Review Comment:
   <!-- Bito Reply -->
   The suggestion to extract the duplicated `initialState` object into a shared 
constant is appropriate. Applying this change improves maintainability by 
ensuring that any future updates to the required state shape only need to be 
made in one location, rather than across multiple test cases.
   
   
**superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx**
   ```
   const EDIT_PROPERTIES_INITIAL_STATE = { explore: { can_overwrite: true, 
can_add: true } };
   
   // ...
   
   render(<ExploreHeader {...props} />, {
     useRedux: true,
     initialState: EDIT_PROPERTIES_INITIAL_STATE,
   });
   ```



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