mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 13:36:16 +08:00
Upgrade @testing-library/user-event
to v14 (#47898)
* Update dependency @testing-library/user-event to v14 * everything is async... * everything is async pt.2 * Fix cascader tests * hack the yarn.lock file to remove the old version of @testing-library/dom * some more fixes! * MOAR FIXES * more fixes * remove a bunch of places where we're wrapping in act() * down to 7 failing tests... * Fix arrow tests * Fix rest of NavBarItem tests * Fix last tests * Use {Enter} instead of {enter} * Revert "Use {Enter} instead of {enter}" This reverts commit e72453bb522245cbc2acd0736929fbb351ad070a. * remove some unused act imports * Fix LibraryPanelsSearch tests * more stable test * More consistent test... Co-authored-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
@ -15,10 +15,10 @@ describe('LokiQueryBuilder', () => {
|
||||
it('tries to load labels when no labels are selected', async () => {
|
||||
const { datasource } = setup();
|
||||
datasource.languageProvider.fetchSeriesLabels = jest.fn().mockReturnValue({ job: ['a'], instance: ['b'] });
|
||||
userEvent.click(screen.getByLabelText('Add'));
|
||||
await userEvent.click(screen.getByLabelText('Add'));
|
||||
const labels = screen.getByText(/Labels/);
|
||||
const selects = getAllByRole(labels.parentElement!.parentElement!.parentElement!, 'combobox');
|
||||
userEvent.click(selects[3]);
|
||||
await userEvent.click(selects[3]);
|
||||
await waitFor(() => expect(screen.getByText('job')).toBeInTheDocument());
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user