import React from 'react'; import { shallow } from 'enzyme'; import { common } from '../../util/generic-tests'; import ProgressBar from './ProgressBar'; describe('ProgressBar', () => { common(ProgressBar, { selectRoot: (wrapper: any) => wrapper.find('.lucid-ProgressBar'), } as any); describe('render', () => { it('should render a ProgressBar', () => { const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); }); describe('props', () => { describe('kind', () => { it('should match snapshot for default', () => { expect(shallow()).toMatchSnapshot(); }); it('should match snapshot for success', () => { expect(shallow()).toMatchSnapshot(); }); it('should match snapshot for warning', () => { expect(shallow()).toMatchSnapshot(); }); it('should match snapshot for danger', () => { expect(shallow()).toMatchSnapshot(); }); it('should match snapshot for info', () => { expect(shallow()).toMatchSnapshot(); }); }); describe('percentComplete', () => { it('should display length of ProgressBar', () => { expect(shallow()).toMatchSnapshot(); }); }); }); describe('childComponents', () => { describe('Title', () => { it('should render a header', () => { expect( shallow( Title ) ).toMatchSnapshot(); }); }); }); });