import * as React from 'react';
import { TopNav } from '../index';
import { Image } from '../../Image';
import { Button } from '../../Button';
import render from '../../utils/_tests/render';
describe('props', () => {
it('should render correctly', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with CSS props', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with a selectedId', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with a defaultSelectedId', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('overrides', () => {
it('TopNav.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
it('TopNav.Item.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
it('TopNav.Section.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('theming', () => {
it('TopNav.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
,
{ theme: { TopNav: { styles: { base: { backgroundColor: 'red' } } } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('TopNav.Item.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
,
{ theme: { TopNav: { Item: { styles: { base: { backgroundColor: 'red' } } } } } }
);
expect(container.firstChild).toMatchSnapshot();
});
it('TopNav.Section.styles.base should render correctly', () => {
const { container } = render(
Get started
Components
,
{ theme: { TopNav: { Section: { styles: { base: { backgroundColor: 'red' } } } } } }
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('defaultProps', () => {
it('should render correctly for className', () => {
const { container } = render(
Get started
Components
,
{
theme: { TopNav: { defaultProps: { className: 'test', color: 'primary' } } },
}
);
expect(container.firstChild).toMatchSnapshot();
});
});