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 e72453bb52.

* 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:
Ashley Harrison
2022-04-21 13:15:21 +01:00
committed by GitHub
parent 9ed7e48454
commit d832bde270
89 changed files with 900 additions and 912 deletions

View File

@@ -28,9 +28,9 @@ describe('PanelNotSupported', () => {
});
describe('when the back to queries button is clicked', () => {
it('then correct action should be dispatched', () => {
it('then correct action should be dispatched', async () => {
setupTestContext({});
userEvent.click(screen.getByRole('button', { name: /go back to queries/i }));
await userEvent.click(screen.getByRole('button', { name: /go back to queries/i }));
expect(locationService.getSearchObject().tab).toBe(PanelEditorTabId.Query);
});
});