@@ -5,10 +5,13 @@ import type { Field } from '../../modules/create-index';
55import { expect } from 'chai' ;
66import type { SinonSpy } from 'sinon' ;
77
8+ import { setupStore } from '../../../test/setup-store' ;
89import sinon from 'sinon' ;
10+ import { Provider } from 'react-redux' ;
911
1012describe ( 'CreateIndexForm' , ( ) => {
1113 let onTabClickSpy : SinonSpy ;
14+ const store = setupStore ( ) ;
1215
1316 beforeEach ( function ( ) {
1417 onTabClickSpy = sinon . spy ( ) ;
@@ -20,24 +23,26 @@ describe('CreateIndexForm', () => {
2023 showIndexesGuidanceVariant ?: boolean ;
2124 } ) => {
2225 render (
23- < CreateIndexForm
24- namespace = "testNamespace"
25- fields = {
26- [
27- { name : 'field1' , type : 'string' } ,
28- { name : 'field2' , type : 'number' } ,
29- ] as Field [ ]
30- }
31- serverVersion = "5.0.0"
32- currentTab = "IndexFlow"
33- onSelectFieldNameClick = { ( ) => { } }
34- onSelectFieldTypeClick = { ( ) => { } }
35- onAddFieldClick = { ( ) => { } }
36- onRemoveFieldClick = { ( ) => { } }
37- onTabClick = { onTabClickSpy }
38- showIndexesGuidanceVariant = { showIndexesGuidanceVariant || false }
39- query = { null }
40- />
26+ < Provider store = { store } >
27+ < CreateIndexForm
28+ namespace = "testNamespace"
29+ fields = {
30+ [
31+ { name : 'field1' , type : 'string' } ,
32+ { name : 'field2' , type : 'number' } ,
33+ ] as Field [ ]
34+ }
35+ serverVersion = "5.0.0"
36+ currentTab = "IndexFlow"
37+ onSelectFieldNameClick = { ( ) => { } }
38+ onSelectFieldTypeClick = { ( ) => { } }
39+ onAddFieldClick = { ( ) => { } }
40+ onRemoveFieldClick = { ( ) => { } }
41+ onTabClick = { onTabClickSpy }
42+ showIndexesGuidanceVariant = { showIndexesGuidanceVariant || false }
43+ query = { null }
44+ />
45+ </ Provider >
4146 ) ;
4247 } ;
4348
0 commit comments