mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 01:20:24 +03:00
Ensured menu is displayed before asserting in DateRangeSelector test
This commit is contained in:
parent
a3ab2c6e1b
commit
c490835f9b
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { screen } from '@testing-library/react';
|
import { screen, waitFor } from '@testing-library/react';
|
||||||
import { Mock } from 'ts-mockery';
|
import { Mock } from 'ts-mockery';
|
||||||
import { DateRangeSelector, DateRangeSelectorProps } from '../../../src/utils/dates/DateRangeSelector';
|
import { DateRangeSelector, DateRangeSelectorProps } from '../../../src/utils/dates/DateRangeSelector';
|
||||||
import { DateInterval } from '../../../src/utils/dates/types';
|
import { DateInterval } from '../../../src/utils/dates/types';
|
||||||
|
@ -16,6 +16,7 @@ describe('<DateRangeSelector />', () => {
|
||||||
);
|
);
|
||||||
|
|
||||||
await result.user.click(screen.getByRole('button'));
|
await result.user.click(screen.getByRole('button'));
|
||||||
|
await waitFor(() => screen.getByRole('menu'));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue