web: components: Moved story for TabContainer + added base test
This commit is contained in:
parent
8585695cc9
commit
e871ce59c8
@ -1,10 +1,10 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { storiesOf } from '@storybook/react';
|
import { storiesOf } from '@storybook/react';
|
||||||
import { withKnobs, boolean, select } from '@storybook/addon-knobs/react';
|
import { withKnobs, boolean } from '@storybook/addon-knobs/react';
|
||||||
import withReadme from 'storybook-readme/with-readme';
|
import withReadme from 'storybook-readme/with-readme';
|
||||||
import Readme from './README.md';
|
import Readme from './README.md';
|
||||||
import { TabContainer } from 'asc-web-components';
|
import TabContainer from '.';
|
||||||
import Section from '../../.storybook/decorators/section';
|
import Section from '../../../.storybook/decorators/section';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
|
||||||
const array_items = [
|
const array_items = [
|
@ -0,0 +1,26 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { mount } from 'enzyme';
|
||||||
|
import TabContainer from '.';
|
||||||
|
|
||||||
|
describe('<TabContainer />', () => {
|
||||||
|
it('renders without error', () => {
|
||||||
|
const wrapper = mount(
|
||||||
|
<TabContainer>{
|
||||||
|
[
|
||||||
|
{
|
||||||
|
key: "0",
|
||||||
|
title: "Title1",
|
||||||
|
content:
|
||||||
|
<div >
|
||||||
|
<div> <button>BUTTON</button> </div>
|
||||||
|
<div> <button>BUTTON</button> </div>
|
||||||
|
<div> <button>BUTTON</button> </div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}</TabContainer>
|
||||||
|
);
|
||||||
|
|
||||||
|
expect(wrapper).toExist();
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user