mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-24 01:48:18 +03:00
13 lines
620 B
TypeScript
13 lines
620 B
TypeScript
import { screen } from '@testing-library/react';
|
|
import { UseExistingIfFoundInfoIcon } from '../../src/short-urls/UseExistingIfFoundInfoIcon';
|
|
import { renderWithEvents } from '../__helpers__/setUpTest';
|
|
|
|
describe('<UseExistingIfFoundInfoIcon />', () => {
|
|
it('shows modal when icon is clicked', async () => {
|
|
const { user } = renderWithEvents(<UseExistingIfFoundInfoIcon />);
|
|
|
|
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
|
|
await user.click(screen.getByTitle('What does this mean?').firstElementChild as Element);
|
|
expect(await screen.findByRole('dialog')).toBeInTheDocument();
|
|
});
|
|
});
|