web: components: Moved story for Label + added base test

This commit is contained in:
Alexey Safronov 2019-09-08 17:01:14 +03:00
parent d1e054f0dc
commit fce2be3a31
3 changed files with 19 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import { storiesOf } from '@storybook/react'; import { storiesOf } from '@storybook/react';
import { text, boolean, withKnobs } from '@storybook/addon-knobs/react'; import { text, boolean, withKnobs } from '@storybook/addon-knobs/react';
import { Label } from 'asc-web-components'; import Label from '.';
import Section from '../../../.storybook/decorators/section'; import Section from '../../../.storybook/decorators/section';
import withReadme from 'storybook-readme/with-readme'; import withReadme from 'storybook-readme/with-readme';
import Readme from './README.md'; import Readme from './README.md';

View File

@ -0,0 +1,18 @@
import React from 'react';
import { mount } from 'enzyme';
import Label from '.';
describe('<IconButton />', () => {
it('renders without error', () => {
const wrapper = mount(
<Label
text="First name:"
title={"first name"}
htmlFor="firstNameField"
display="block"
/>
);
expect(wrapper).toExist();
});
});