Skip to content

Commit

Permalink
add blockconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Oct 7, 2023
1 parent 2ce5b80 commit d3b756b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/components/manage/Blocks/LeadImage/View.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
import React from 'react';
import renderer from 'react-test-renderer';

import config from '@plone/volto/registry';
import View from './View';

import { getLeadImageBlockSizes } from './utils';

config.blocks.blocksConfig = {
leadimage: {
id: 'leadimage',
title: 'Image',
group: 'media',
extensions: {},
variations: [],
restricted: false,
mostUsed: true,
sidebarTab: 1,
security: {
addPermission: [],
view: [],
},
getSizes: getLeadImageBlockSizes,
},
};

test('renders a view image component', () => {
const component = renderer.create(
<View
Expand Down

0 comments on commit d3b756b

Please sign in to comment.