michael-s-molina commented on code in PR #23760:
URL: https://github.com/apache/superset/pull/23760#discussion_r1173755420
##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/SqlEditorLeftBar.test.jsx:
##########
@@ -37,11 +38,32 @@ const mockedProps = {
},
height: 0,
};
-const middlewares = [thunk];
-const mockStore = configureStore(middlewares);
-const store = mockStore(initialState);
+
+let store;
+let actions;
+
+const logAction = () => next => action => {
+ if (typeof action === 'function') {
+ return next(action);
+ }
+
+ actions.push(action);
+
Review Comment:
```suggestion
```
##########
superset-frontend/spec/helpers/testing-library.tsx:
##########
@@ -81,8 +95,8 @@ export function createWrapper(options?: Options) {
result = <BrowserRouter>{result}</BrowserRouter>;
}
- if (useQuery) {
- result = <QueryProvider>{result}</QueryProvider>;
+ if (useQuery && !useRedux) {
Review Comment:
Previously, the developer had the option to use query params without Redux.
Now it's a little bit weird because you are setting `useQuery` and the store is
being configured underneath. `useQuery` is more related to the URL query params
than Redux. Could you separate the concepts again?
##########
superset-frontend/src/SqlLab/components/SqlEditorLeftBar/SqlEditorLeftBar.test.jsx:
##########
@@ -37,11 +38,32 @@ const mockedProps = {
},
height: 0,
};
-const middlewares = [thunk];
-const mockStore = configureStore(middlewares);
-const store = mockStore(initialState);
+
+let store;
+let actions;
+
+const logAction = () => next => action => {
+ if (typeof action === 'function') {
+ return next(action);
+ }
+
Review Comment:
```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]