soupette e6544db5a0 Make admin a plugin
Signed-off-by: soupette <cyril.lpz@gmail.com>
2021-06-24 08:30:41 +02:00

47 lines
1.2 KiB
JavaScript

'use strict';
// eslint-disable-next-line node/no-extraneous-require
const { combineReducers, createStore } = require('redux');
const reducers = {
'content-manager_app': jest.fn(() => ({
components: [],
status: 'loading',
models: [],
collectionTypeLinks: [],
singleTypeLinks: [],
})),
'content-manager_listView': jest.fn(() => ({
data: [],
didDeleteData: false,
entriesToDelete: [],
isLoading: true,
showModalConfirmButtonLoading: false,
showWarningDelete: false,
showWarningDeleteAll: false,
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,
data: {},
status: 'resolved',
})),
rbacProvider: jest.fn(() => ({ allPermissions: null, collectionTypesRelatedPermissions: {} })),
};
const store = createStore(combineReducers(reducers));
module.exports = {
store,
state: store.getState(),
};