import React from 'react'; import { render } from '@testing-library/react'; import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon'; import { ApplicationLauncher } from '../ApplicationLauncher'; import { ApplicationLauncherItem } from '../ApplicationLauncherItem'; import { DropdownPosition, DropdownDirection } from '../../Dropdown/dropdownConstants'; import { ApplicationLauncherSeparator } from '../ApplicationLauncherSeparator'; const dropdownItems = [ Link, Action , Disabled Link , Disabled Action , , Separated Link, Separated Action ]; describe('ApplicationLauncher', () => { test('regular', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); test('right aligned', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); test('dropup', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); test('dropup + right aligned', () => { const { asFragment } = render( ); expect(asFragment()).toMatchSnapshot(); }); test('expanded', () => { const { asFragment } = render(); expect(asFragment()).toMatchSnapshot(); }); test('custom icon', () => { const { asFragment } = render( } /> ); expect(asFragment()).toMatchSnapshot(); }); test('Renders in strict mode', () => { const consoleError = jest.spyOn(console, 'error'); const { asFragment } = render( {' '} ); expect(consoleError).not.toHaveBeenCalled(); expect(asFragment()).toMatchSnapshot(); }); });