@@ -5,7 +5,7 @@ import { history, render } from "../test_helpers"
5
5
import { SignInPage } from "./login"
6
6
import { server } from "../test_helpers/server"
7
7
import { rest } from "msw"
8
- import { LANGUAGE } from "../components/SignIn/SignInForm"
8
+ import { Language } from "../components/SignIn/SignInForm"
9
9
10
10
describe ( "SignInPage" , ( ) => {
11
11
beforeEach ( ( ) => {
@@ -23,7 +23,7 @@ describe("SignInPage", () => {
23
23
render ( < SignInPage /> )
24
24
25
25
// Then
26
- await screen . findByText ( LANGUAGE . signIn , { exact : false } )
26
+ await screen . findByText ( Language . signIn , { exact : false } )
27
27
} )
28
28
29
29
it ( "shows an error message if SignIn fails" , async ( ) => {
@@ -38,17 +38,17 @@ describe("SignInPage", () => {
38
38
39
39
// When
40
40
// Set email / password
41
- const email = screen . getByLabelText ( LANGUAGE . emailLabel )
42
- const password = screen . getByLabelText ( LANGUAGE . passwordLabel )
41
+ const email = screen . getByLabelText ( Language . emailLabel )
42
+ const password = screen . getByLabelText ( Language . passwordLabel )
43
43
userEvent . type ( email , "[email protected] " )
44
44
userEvent . type ( password , "password" )
45
45
// Click sign-in
46
- const signInButton = await screen . findByText ( LANGUAGE . signIn )
46
+ const signInButton = await screen . findByText ( Language . signIn )
47
47
act ( ( ) => signInButton . click ( ) )
48
48
49
49
// Then
50
50
// Finding error by test id because it comes from the backend
51
- const errorMessage = await screen . findByText ( LANGUAGE . authErrorMessage )
51
+ const errorMessage = await screen . findByText ( Language . authErrorMessage )
52
52
expect ( errorMessage ) . toBeDefined ( )
53
53
expect ( history . location . pathname ) . toEqual ( "/login" )
54
54
} )
0 commit comments