web: components: Moved story for ContextMenuButton + added base test
This commit is contained in:
parent
68da8fd692
commit
cc6acdc562
@ -0,0 +1,16 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import ContextMenuButton from '.';
|
||||
|
||||
describe('<ContextMenuButton />', () => {
|
||||
it('renders without error', () => {
|
||||
const wrapper = mount(
|
||||
<ContextMenuButton
|
||||
title="Actions"
|
||||
getData={() => [{key: 'key', label: 'label', onClick: () => alert('label')}]}
|
||||
/>
|
||||
);
|
||||
|
||||
expect(wrapper).toExist();
|
||||
});
|
||||
});
|
@ -3,8 +3,9 @@ import { storiesOf } from '@storybook/react';
|
||||
import { withKnobs, text, select, number, color, boolean } from '@storybook/addon-knobs/react';
|
||||
import withReadme from 'storybook-readme/with-readme';
|
||||
import Readme from './README.md';
|
||||
import Section from '../../.storybook/decorators/section';
|
||||
import { ContextMenuButton, Icons } from 'asc-web-components';
|
||||
import Section from '../../../.storybook/decorators/section';
|
||||
import ContextMenuButton from '.';
|
||||
import { Icons } from '../icons';
|
||||
|
||||
const iconNames = Object.keys(Icons);
|
||||
|
Loading…
Reference in New Issue
Block a user