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

This commit is contained in:
Alexey Safronov 2019-09-08 18:08:21 +03:00
parent 8355a084fa
commit 9087d689bc
4 changed files with 19 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import React from 'react';
import { mount } from 'enzyme';
import PasswordInput from '.';
describe('<Paging />', () => {
describe('<PasswordInput />', () => {
it('renders without error', () => {
const settings = {
minLength: 6,

View File

@ -1,7 +1,7 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import withReadme from 'storybook-readme/with-readme';
import { RadioButton } from 'asc-web-components';
import RadioButton from '.';
import Section from '../../../.storybook/decorators/section';
import { withKnobs, text, boolean } from '@storybook/addon-knobs/react';
import Readme from './README.md';
@ -13,7 +13,6 @@ storiesOf('Components|Input', module)
.add('radio button', () => {
return (
<Section>
<>
<RadioButton
value={text('value', 'value')}
name={text('name', 'name')}
@ -29,7 +28,6 @@ storiesOf('Components|Input', module)
}
}
/>
</>
</Section>
);
});

View File

@ -0,0 +1,17 @@
import React from 'react';
import { mount } from 'enzyme';
import RadioButton from '.';
describe('<RadioButton />', () => {
it('renders without error', () => {
const wrapper = mount(
<RadioButton
name='fruits'
value= 'apple'
label= 'Sweet apple'
/>
);
expect(wrapper).toExist();
});
});