Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2835bb4

Browse files
authored
chore: bump @testing-library/user-event from ^13.5.0 to 14.1.0 (#972)
1 parent c97180c commit 2835bb4

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@storybook/addon-links": "6.4.21",
5151
"@storybook/react": "6.4.21",
5252
"@testing-library/react": "12.1.4",
53-
"@testing-library/user-event": "^13.5.0",
53+
"@testing-library/user-event": "14.1.0",
5454
"@types/express": "4.17.13",
5555
"@types/jest": "27.4.1",
5656
"@types/node": "14.18.12",

site/src/pages/login.test.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,30 @@ describe("SignInPage", () => {
2323
render(<SignInPage />)
2424

2525
// Then
26-
await screen.findByText(Language.signIn, { exact: false })
26+
await screen.findByText(Language.signIn)
2727
})
2828

2929
it("shows an error message if SignIn fails", async () => {
3030
// Given
31-
render(<SignInPage />)
32-
// Make login fail
3331
server.use(
32+
// Make login fail
3433
rest.post("/api/v2/users/login", async (req, res, ctx) => {
3534
return res(ctx.status(500), ctx.json({ message: "nope" }))
3635
}),
3736
)
3837

3938
// When
40-
// Set email / password
39+
render(<SignInPage />)
4140
const email = screen.getByLabelText(Language.emailLabel)
4241
const password = screen.getByLabelText(Language.passwordLabel)
43-
userEvent.type(email, "[email protected]")
44-
userEvent.type(password, "password")
42+
await userEvent.type(email, "[email protected]")
43+
await userEvent.type(password, "password")
44+
4545
// Click sign-in
4646
const signInButton = await screen.findByText(Language.signIn)
4747
act(() => signInButton.click())
4848

4949
// Then
50-
// Finding error by test id because it comes from the backend
5150
const errorMessage = await screen.findByText(Language.authErrorMessage)
5251
expect(errorMessage).toBeDefined()
5352
expect(history.location.pathname).toEqual("/login")

site/yarn.lock

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,9 +2709,9 @@
27092709
store2 "^2.12.0"
27102710

27112711
"@testing-library/dom@^8.0.0":
2712-
version "8.11.3"
2713-
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.11.3.tgz#38fd63cbfe14557021e88982d931e33fb7c1a808"
2714-
integrity sha512-9LId28I+lx70wUiZjLvi1DB/WT2zGOxUh46glrSNMaWVx849kKAluezVzZrXJfTKKoQTmEOutLes/bHg4Bj3aA==
2712+
version "8.13.0"
2713+
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.13.0.tgz#bc00bdd64c7d8b40841e27a70211399ad3af46f5"
2714+
integrity sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ==
27152715
dependencies:
27162716
"@babel/code-frame" "^7.10.4"
27172717
"@babel/runtime" "^7.12.5"
@@ -2731,12 +2731,10 @@
27312731
"@testing-library/dom" "^8.0.0"
27322732
"@types/react-dom" "*"
27332733

2734-
"@testing-library/user-event@^13.5.0":
2735-
version "13.5.0"
2736-
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-13.5.0.tgz#69d77007f1e124d55314a2b73fd204b333b13295"
2737-
integrity sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==
2738-
dependencies:
2739-
"@babel/runtime" "^7.12.5"
2734+
"@testing-library/[email protected]":
2735+
version "14.1.0"
2736+
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.1.0.tgz#db479c06271b72a4d41cf595ec2ad7ff078c1d72"
2737+
integrity sha512-+CGfMXlVM+OwREHDEsfTGsXIMI+rjr3a7YBUSutq7soELht+8kQrM5k46xa/WLfHdtX/wqsDIleL6bi4i+xz0w==
27402738

27412739
"@tootallnate/once@1":
27422740
version "1.1.2"
@@ -3079,7 +3077,14 @@
30793077
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc"
30803078
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==
30813079

3082-
"@types/react-dom@*", "@types/[email protected]":
3080+
"@types/react-dom@*":
3081+
version "18.0.0"
3082+
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.0.tgz#b13f8d098e4b0c45df4f1ed123833143b0c71141"
3083+
integrity sha512-49897Y0UiCGmxZqpC8Blrf6meL8QUla6eb+BBhn69dTXlmuOlzkfr7HHY/O8J25e1lTUMs+YYxSlVDAaGHCOLg==
3084+
dependencies:
3085+
"@types/react" "*"
3086+
3087+
30833088
version "17.0.14"
30843089
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.14.tgz#c8f917156b652ddf807711f5becbd2ab018dea9f"
30853090
integrity sha512-H03xwEP1oXmSfl3iobtmQ/2dHF5aBHr8aUMwyGZya6OW45G+xtdzmq6HkncefiBt5JU8DVyaWl/nWZbjZCnzAQ==

0 commit comments

Comments
 (0)