@@ -42,29 +42,29 @@ export default function Signup() {
4242 style = { { minHeight : "100vh" } } >
4343 < div className = "w-100" style = { { maxWidth : "400px" } } >
4444 < Card >
45- < Card . Body >
46- < h2 className = "text-center mb-4" > Sign Up</ h2 >
47- { error && < Alert variant = "danger" > { error } </ Alert > }
48- < Form onSubmit = { handleSubmit } >
49- < Form . Group id = "email" >
50- < Form . Label > Email</ Form . Label >
51- < Form . Control type = "email" placeholder = "member@utasks.com" ref = { emailRef } required />
45+ < Card . Body data-testid = "signup-card" >
46+ < h2 className = "text-center mb-4" data-testid = "title" > Sign Up</ h2 >
47+ { error && < Alert variant = "danger" data-testid = "error-message" > { error } </ Alert > }
48+ < Form onSubmit = { handleSubmit } data-testid = "signup-form" >
49+ < Form . Group id = "email" data-testid = "email" >
50+ < Form . Label data-testid = "label" > Email</ Form . Label >
51+ < Form . Control type = "email" placeholder = "member@utasks.com" ref = { emailRef } required data-testid = "input" />
5252 </ Form . Group >
53- < Form . Group id = "password" >
54- < Form . Label > Password</ Form . Label >
55- < Form . Control type = "password" ref = { passwordRef } required />
53+ < Form . Group id = "password" data-testid = "password" >
54+ < Form . Label data-testid = "label" > Password</ Form . Label >
55+ < Form . Control type = "password" ref = { passwordRef } required data-testid = "input" />
5656 </ Form . Group >
57- < Form . Group id = "password-confirm" >
58- < Form . Label > Password Confirmation</ Form . Label >
59- < Form . Control type = "password" ref = { passwordConfirmRef } required />
57+ < Form . Group id = "password-confirm" data-testid = "confirm-password" >
58+ < Form . Label data-testid = "label" > Password Confirmation</ Form . Label >
59+ < Form . Control type = "password" ref = { passwordConfirmRef } required data-testid = "input" />
6060 </ Form . Group >
61- < Button disabled = { loading } className = "w-100" type = "submit" style = { { background : "#0080c8" , borderColor : "#0080c8" } } >
61+ < Button disabled = { loading } className = "w-100" type = "submit" style = { { background : "#0080c8" , borderColor : "#0080c8" } } data-testid = "signup-btn" >
6262 Sign Up
6363 </ Button >
6464 </ Form >
6565 </ Card . Body >
6666 </ Card >
67- < div className = "w-100 text-center mt-2" >
67+ < div className = "w-100 text-center mt-2" data-testid = "login" >
6868 Already have an account? < Link to = "/login" style = { { color : "#0080c8" } } > Log In</ Link >
6969 </ div >
7070 </ div >
0 commit comments