| 
									
										
										
										
											2021-05-24 17:26:56 +02:00
										 |  |  | 'use strict'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // eslint-disable-next-line node/no-extraneous-require
 | 
					
						
							|  |  |  | const { combineReducers, createStore } = require('redux'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const reducers = { | 
					
						
							| 
									
										
										
										
											2022-03-29 10:10:27 +02:00
										 |  |  |   admin_app: jest.fn(() => ({ status: 'init' })), | 
					
						
							| 
									
										
										
										
											2021-06-24 08:22:44 +02:00
										 |  |  |   'content-manager_app': jest.fn(() => ({ | 
					
						
							|  |  |  |     components: [], | 
					
						
							|  |  |  |     status: 'loading', | 
					
						
							|  |  |  |     models: [], | 
					
						
							|  |  |  |     collectionTypeLinks: [], | 
					
						
							|  |  |  |     singleTypeLinks: [], | 
					
						
							|  |  |  |   })), | 
					
						
							|  |  |  |   'content-manager_listView': jest.fn(() => ({ | 
					
						
							|  |  |  |     data: [], | 
					
						
							|  |  |  |     isLoading: true, | 
					
						
							| 
									
										
										
										
											2021-12-31 17:26:13 +01:00
										 |  |  |     components: [], | 
					
						
							| 
									
										
										
										
											2021-06-24 08:22:44 +02:00
										 |  |  |     contentType: {}, | 
					
						
							|  |  |  |     initialDisplayedHeaders: [], | 
					
						
							|  |  |  |     displayedHeaders: [], | 
					
						
							|  |  |  |     pagination: { | 
					
						
							|  |  |  |       total: 0, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   })), | 
					
						
							|  |  |  |   'content-manager_rbacManager': jest.fn(() => ({ permissions: null })), | 
					
						
							|  |  |  |   'content-manager_editViewLayoutManager': jest.fn(() => ({ currentLayout: null })), | 
					
						
							|  |  |  |   'content-manager_editViewCrudReducer': jest.fn(() => ({ | 
					
						
							|  |  |  |     componentsDataStructure: {}, | 
					
						
							|  |  |  |     contentTypeDataStructure: {}, | 
					
						
							|  |  |  |     isLoading: true, | 
					
						
							| 
									
										
										
										
											2021-11-15 18:22:03 +01:00
										 |  |  |     data: null, | 
					
						
							| 
									
										
										
										
											2021-06-24 08:22:44 +02:00
										 |  |  |     status: 'resolved', | 
					
						
							|  |  |  |   })), | 
					
						
							| 
									
										
										
										
											2021-05-24 17:26:56 +02:00
										 |  |  |   rbacProvider: jest.fn(() => ({ allPermissions: null, collectionTypesRelatedPermissions: {} })), | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-31 12:45:57 +02:00
										 |  |  | const store = createStore(combineReducers(reducers)); | 
					
						
							| 
									
										
										
										
											2021-05-24 17:26:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-05-31 12:45:57 +02:00
										 |  |  | module.exports = { | 
					
						
							|  |  |  |   store, | 
					
						
							|  |  |  |   state: store.getState(), | 
					
						
							|  |  |  | }; |