Fix tests

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2020-10-14 17:20:33 +02:00
parent 3ae6291467
commit 3d4a684076
3 changed files with 7 additions and 0 deletions

View File

@ -19,11 +19,13 @@ describe('<Admin />', () => {
props = {
admin: {
appError: false,
latestStrapiReleaseTag: '3',
},
disableGlobalOverlayBlocker: jest.fn(),
emitEvent: jest.fn(),
enableGlobalOverlayBlocker: jest.fn(),
getInfosDataSucceeded: jest.fn(),
getStrapiLatestReleaseSucceeded: jest.fn(),
getUserPermissions: jest.fn(),
getUserPermissionsError: jest.fn(),
getUserPermissionsSucceeded: jest.fn(),
@ -43,6 +45,7 @@ describe('<Admin />', () => {
intl: {
formatMessage: jest.fn(),
},
location: {},
setAppError: jest.fn(),
showGlobalAppBlocker: jest.fn(),

View File

@ -1,4 +1,5 @@
import produce from 'immer';
import packageJSON from '../../../../../package.json';
import {
setAppError,
getUserPermissions,
@ -14,6 +15,7 @@ describe('adminReducer', () => {
state = {
appError: false,
isLoading: true,
latestStrapiReleaseTag: `v${packageJSON.version}`,
userPermissions: [],
};
});

View File

@ -112,6 +112,7 @@ describe('ADMIN | LeftMenu | init', () => {
title: 'Settings.webhooks.title',
to: '/settings/webhooks',
name: 'webhooks',
permissions: [
{ action: 'admin::webhook.create', subject: null },
{ action: 'admin::webhook.read', subject: null },
@ -223,6 +224,7 @@ describe('ADMIN | LeftMenu | init', () => {
label: 'app.components.LeftMenuLinkContainer.settings',
isDisplayed: false,
destination: SETTINGS_BASE_URL,
notificationsCount: 0,
permissions: [
// webhooks
{ action: 'admin::webhook.create', subject: null },