diff --git a/package.json b/package.json index b2853126860..6dc4899d787 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "@testing-library/cypress": "9.0.0", "@testing-library/dom": "8.20.1", "@testing-library/jest-dom": "5.17.0", - "@testing-library/user-event": "13.5.0", + "@testing-library/user-event": "14.5.2", "@types/jest": "29.5.12", "@types/lodash": "4.14.202", "@types/node": "18.19.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 25c5e80e028..eae9822eb7f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,8 +37,8 @@ importers: specifier: 5.17.0 version: 5.17.0 '@testing-library/user-event': - specifier: 13.5.0 - version: 13.5.0(@testing-library/dom@8.20.1) + specifier: 14.5.2 + version: 14.5.2(@testing-library/dom@8.20.1) '@types/jest': specifier: 29.5.12 version: 29.5.12 @@ -10377,13 +10377,12 @@ packages: react-dom: 16.14.0(react@16.14.0) dev: true - /@testing-library/user-event@13.5.0(@testing-library/dom@8.20.1): - resolution: {integrity: sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==} - engines: {node: '>=10', npm: '>=6'} + /@testing-library/user-event@14.5.2(@testing-library/dom@8.20.1): + resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==} + engines: {node: '>=12', npm: '>=6'} peerDependencies: '@testing-library/dom': '>=7.21.4' dependencies: - '@babel/runtime': 7.23.1 '@testing-library/dom': 8.20.1 dev: true diff --git a/tools/ui-components/src/button/button.test.tsx b/tools/ui-components/src/button/button.test.tsx index 7cc90d755ad..5ffd313495e 100644 --- a/tools/ui-components/src/button/button.test.tsx +++ b/tools/ui-components/src/button/button.test.tsx @@ -33,14 +33,14 @@ describe('); const button = screen.getByRole('button', { name: /hello world/i }); - userEvent.click(button); + await userEvent.click(button); expect(onClick).toHaveBeenCalledTimes(1); }); @@ -56,7 +56,7 @@ describe('