import React from 'react'; import { render } from '@testing-library/react'; import { Masthead, MastheadBrand, MastheadContent, MastheadMain, MastheadToggle } from '../index'; describe('Masthead', () => { test('verify basic', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify full structure', () => { const { asFragment } = render( Toggle Logo Content ); expect(asFragment()).toMatchSnapshot(); }); test('verify custom class', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify inline display breakpoints', () => { const { asFragment } = render( test ); expect(asFragment()).toMatchSnapshot(); }); test('verify stack display breakpoints', () => { const { asFragment } = render( test ); expect(asFragment()).toMatchSnapshot(); }); Object.values(['insetNone', 'insetXs', 'insetSm', 'insetMd', 'insetLg', 'insetXl', 'inset2xl', 'inset3xl'] as [ 'insetNone', 'insetXs', 'insetSm', 'insetMd', 'insetLg', 'insetXl', 'inset2xl', 'inset3xl' ]).forEach(inset => { test(`verify ${inset} inset breakpoints`, () => { const { asFragment } = render( test ); expect(asFragment()).toMatchSnapshot(); }); }); }); describe('MastheadBrand', () => { test('verify basic', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify custom class', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify default component', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify custom component', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify anchor component with href', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); }); describe('MastheadContent', () => { test('verify basic', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify custom class', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); }); describe('MastheadMain', () => { test('verify basic', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify custom class', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); }); describe('MastheadToggle', () => { test('verify basic', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); test('verify custom class', () => { const { asFragment } = render(test); expect(asFragment()).toMatchSnapshot(); }); });