import * as React from 'react'; import { renderHook } from '@testing-library/react-hooks'; import { SelectMenu } from '../SelectMenu'; import render from '../../utils/_tests/render'; import { Size } from '../../types'; describe('props', () => { it('should render correctly', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); it('should render correctly with CSS props', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('variants', () => { it('styles.base should render correctly', () => { const { container } = render( , { theme: { SelectMenu: { variants: { test: { styles: { base: { backgroundColor: 'red' } } } } } }, } ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('overrides', () => { it('styles.base should render correctly', () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('sizes', () => { ['small', 'medium', 'large'].forEach((size) => { it(`should render ${size} correctly`, () => { const { container } = render( ); expect(container.firstChild).toMatchSnapshot(); }); }); }); describe('theming', () => { it('styles.base should render correctly', () => { const { container } = render( , { theme: { SelectMenu: { styles: { base: { backgroundColor: 'red' } } } }, } ); expect(container.firstChild).toMatchSnapshot(); }); }); describe('defaultProps', () => { it('should render correctly for className', () => { const { container } = render( , { theme: { SelectMenu: { defaultProps: { className: 'test', color: 'primary' } } }, } ); expect(container.firstChild).toMatchSnapshot(); }); });