mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
refactor: Upgrade Redux (#11967)
* upgrade redux and react-redux, adjust types * first round of test fixes * fix rest of unit tests * lint Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
This commit is contained in:
committed by
GitHub
parent
9121482479
commit
6270fa2026
@@ -20,6 +20,7 @@ import React from 'react';
|
||||
import thunk from 'redux-thunk';
|
||||
import configureStore from 'redux-mock-store';
|
||||
import fetchMock from 'fetch-mock';
|
||||
import { Provider } from 'react-redux';
|
||||
import { styledMount as mount } from 'spec/helpers/theming';
|
||||
|
||||
import DatabaseList from 'src/views/CRUD/data/database/DatabaseList';
|
||||
@@ -81,10 +82,11 @@ fetchMock.get(databaseRelatedEndpoint, {
|
||||
});
|
||||
|
||||
describe('DatabaseList', () => {
|
||||
const wrapper = mount(<DatabaseList user={mockUser} />, {
|
||||
context: { store },
|
||||
});
|
||||
|
||||
const wrapper = mount(
|
||||
<Provider store={store}>
|
||||
<DatabaseList user={mockUser} />
|
||||
</Provider>,
|
||||
);
|
||||
beforeAll(async () => {
|
||||
await waitForComponentToPaint(wrapper);
|
||||
});
|
||||
|
||||
@@ -43,12 +43,8 @@ const dbProps = {
|
||||
};
|
||||
|
||||
describe('DatabaseModal', () => {
|
||||
const wrapper = mount(<DatabaseModal {...mockedProps} />, {
|
||||
context: { store },
|
||||
});
|
||||
const editWrapper = mount(<DatabaseModal {...dbProps} />, {
|
||||
context: { store },
|
||||
});
|
||||
const wrapper = mount(<DatabaseModal store={store} {...mockedProps} />);
|
||||
const editWrapper = mount(<DatabaseModal store={store} {...dbProps} />);
|
||||
|
||||
it('renders', () => {
|
||||
expect(wrapper.find(DatabaseModal)).toExist();
|
||||
|
||||
Reference in New Issue
Block a user