mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-06-01 10:06:17 +00:00
Move shlink-web-component tests to their own folder
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user