// @ts-ignore
import { configure, shallow } from 'enzyme';
// @ts-ignore
import Adapter from 'enzyme-adapter-react-16';
import * as React from 'react';
import { Text } from 'react-native';
import renderer from 'react-test-renderer';
import MDNoticeBar, { MDNoticeBarStyles } from '../index';
const styles = Object.assign({}, MDNoticeBarStyles, {
wrapper: {
position: 'relative',
backgroundColor: '#ddd',
},
});
configure({ adapter: new Adapter() });
it('renders correctly with defaults', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with default type', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with warning type', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with activity type', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with round', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with no round', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with security icon', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with mode', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with multiRows', () => {
const component = renderer
.create(
testtesttesttesttesttesttesttesttesttest
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with time', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with scrollable', () => {
const component = renderer
.create(
testtesttesttesttesttesttesttesttesttest
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with empty style', () => {
// @ts-ignore
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with custom style', () => {
const component = renderer.create().toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with onPress', () => {
const component = renderer
.create(
{
console.log(value);
}}
/>
)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with left', () => {
const component = renderer
.create(test} />)
.toJSON();
expect(component).toMatchSnapshot();
});
it('renders correctly with right', () => {
const component = renderer
.create(test} />)
.toJSON();
expect(component).toMatchSnapshot();
});