@@ -26,14 +26,9 @@ describe('AuthPage ', () => {
26
26
expect ( getByText ( 'Terminal' ) ) . toBeInTheDocument ( ) ;
27
27
} ) ;
28
28
29
- it ( 'should display the password field' , ( ) => {
30
- const { getByLabelText } = render ( ) ;
31
- expect ( getByLabelText ( 'Enter your password in the field above' ) ) . toBeInTheDocument ( ) ;
32
- } ) ;
33
-
34
- it ( 'should display the submit button' , ( ) => {
29
+ it ( 'should display the login button' , ( ) => {
35
30
const { getByText } = render ( ) ;
36
- expect ( getByText ( 'Submit ' ) ) . toBeInTheDocument ( ) ;
31
+ expect ( getByText ( 'Login ' ) ) . toBeInTheDocument ( ) ;
37
32
} ) ;
38
33
39
34
it ( 'should display nothing when the store is not initialized' , ( ) => {
@@ -49,7 +44,7 @@ describe('AuthPage ', () => {
49
44
50
45
it ( 'should display an error when submitting an empty password' , async ( ) => {
51
46
const { getByText, findByText } = render ( ) ;
52
- fireEvent . click ( getByText ( 'Submit ' ) ) ;
47
+ fireEvent . click ( getByText ( 'Login ' ) ) ;
53
48
expect ( await findByText ( 'oops, password is required' ) ) . toBeInTheDocument ( ) ;
54
49
} ) ;
55
50
@@ -59,10 +54,8 @@ describe('AuthPage ', () => {
59
54
return undefined as any ;
60
55
} ) ;
61
56
62
- const { getByText, getByLabelText, findByText } = render ( ) ;
63
- const input = getByLabelText ( 'Enter your password in the field above' ) ;
64
- fireEvent . change ( input , { target : { value : 'test-pw' } } ) ;
65
- fireEvent . click ( getByText ( 'Submit' ) ) ;
57
+ const { getByText, findByText } = render ( ) ;
58
+ fireEvent . click ( getByText ( 'Login' ) ) ;
66
59
expect ( await findByText ( 'oops, that password is incorrect' ) ) . toBeInTheDocument ( ) ;
67
60
} ) ;
68
61
} ) ;
0 commit comments