web: components: Moved story for RadioButton + added base test
This commit is contained in:
parent
8355a084fa
commit
9087d689bc
@ -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,
|
||||
|
@ -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>
|
||||
);
|
||||
});
|
@ -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();
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user