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

This commit is contained in:
Alexey Safronov 2019-09-08 18:54:18 +03:00
parent 8585695cc9
commit e871ce59c8
3 changed files with 29 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import React from '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 Readme from './README.md';
import { TabContainer } from 'asc-web-components';
import Section from '../../.storybook/decorators/section';
import TabContainer from '.';
import Section from '../../../.storybook/decorators/section';
import { action } from '@storybook/addon-actions';
const array_items = [

View File

@ -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();
});
});