mirror of
https://github.com/strapi/strapi.git
synced 2025-07-26 18:38:46 +00:00
57 lines
1.8 KiB
JavaScript
57 lines
1.8 KiB
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
// eslint-disable-next-line node/no-extraneous-require
|
||
|
const { combineReducers, createStore } = require('redux');
|
||
|
|
||
|
const reducers = {
|
||
|
app: jest.fn(() => ({ isLoading: true, uuid: false })),
|
||
|
language: jest.fn(() => ({ locale: 'en' })),
|
||
|
menu: jest.fn(() => ({
|
||
|
collectionTypesSectionLinks: [],
|
||
|
generalSectionLinks: [
|
||
|
{
|
||
|
icon: 'list',
|
||
|
label: 'app.components.LeftMenuLinkContainer.listPlugins',
|
||
|
destination: '/list-plugins',
|
||
|
isDisplayed: false,
|
||
|
permissions: [
|
||
|
{ action: 'admin::marketplace.read', subject: null },
|
||
|
{ action: 'admin::marketplace.plugins.install', subject: null },
|
||
|
{ action: 'admin::marketplace.plugins.uninstall', subject: null },
|
||
|
],
|
||
|
notificationsCount: 0,
|
||
|
},
|
||
|
{
|
||
|
icon: 'shopping-basket',
|
||
|
label: 'app.components.LeftMenuLinkContainer.installNewPlugin',
|
||
|
destination: '/marketplace',
|
||
|
isDisplayed: false,
|
||
|
permissions: [
|
||
|
{ action: 'admin::marketplace.read', subject: null },
|
||
|
{ action: 'admin::marketplace.plugins.install', subject: null },
|
||
|
{ action: 'admin::marketplace.plugins.uninstall', subject: null },
|
||
|
],
|
||
|
notificationsCount: 0,
|
||
|
},
|
||
|
{
|
||
|
icon: 'cog',
|
||
|
label: 'app.components.LeftMenuLinkContainer.settings',
|
||
|
isDisplayed: false,
|
||
|
destination: '/settings',
|
||
|
// Permissions of this link are retrieved in the init phase
|
||
|
// using the settings menu
|
||
|
permissions: [],
|
||
|
notificationsCount: 0,
|
||
|
},
|
||
|
],
|
||
|
singleTypesSectionLinks: [],
|
||
|
pluginsSectionLinks: [],
|
||
|
isLoading: true,
|
||
|
})),
|
||
|
rbacProvider: jest.fn(() => ({ allPermissions: null, collectionTypesRelatedPermissions: {} })),
|
||
|
};
|
||
|
|
||
|
const store = createStore(combineReducers(reducers)).getState();
|
||
|
|
||
|
module.exports = store;
|