mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-12-10 14:16:59 -06:00
14 lines
618 B
TypeScript
14 lines
618 B
TypeScript
import { screen } from '@testing-library/react';
|
|
import { UseExistingIfFoundInfoIcon } from '../../src/short-urls/UseExistingIfFoundInfoIcon';
|
|
import { renderWithEvents } from '../__mocks__/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();
|
|
});
|
|
});
|