Skip to content

Commit ac4a296

Browse files
committed
fixed index flow section test by wrapping it in provider
1 parent 90317a1 commit ac4a296

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

packages/compass-indexes/src/components/create-index-form/index-flow-section.spec.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ import { render, screen } from '@mongodb-js/testing-library-compass';
33
import IndexFlowSection from './index-flow-section';
44
import { expect } from 'chai';
55
import type { Field } from '../../modules/create-index';
6+
import { Provider } from 'react-redux';
7+
import { setupStore } from '../../../test/setup-store';
68

79
describe('IndexFlowSection', () => {
10+
const store = setupStore();
811
const renderComponent = ({
912
createIndexFieldsComponent,
1013
fields,
@@ -13,12 +16,14 @@ describe('IndexFlowSection', () => {
1316
fields?: Field[];
1417
}) => {
1518
render(
16-
<IndexFlowSection
17-
createIndexFieldsComponent={createIndexFieldsComponent ?? null}
18-
fields={fields || []}
19-
dbName={'fakeDBName'}
20-
collectionName={'fakeCollectionName'}
21-
/>
19+
<Provider store={store}>
20+
<IndexFlowSection
21+
createIndexFieldsComponent={createIndexFieldsComponent ?? null}
22+
fields={fields || []}
23+
dbName={'fakeDBName'}
24+
collectionName={'fakeCollectionName'}
25+
/>
26+
</Provider>
2227
);
2328
};
2429

0 commit comments

Comments
 (0)