Skip to content

Commit d1d09ec

Browse files
committed
changement data-tesid
1 parent 011fd03 commit d1d09ec

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

frontend/src/components/forms/auth/LoginForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const LoginForm = () => {
5959
>
6060
{messageError.length > 0 ? <p className="error-message">{messageError}</p> : null}
6161
<Input
62-
dataTestId="emailLogin"
62+
data-testid="emailLogin"
6363
theme="dark"
6464
type="text"
6565
name="email"
@@ -68,7 +68,7 @@ const LoginForm = () => {
6868
onChange={(e) => setForm({ ...form, email: e.target.value })}
6969
/>
7070
<Input
71-
dataTestId="passwordLogin"
71+
data-testid="passwordLogin"
7272
theme="dark"
7373
type="password"
7474
name="password"

frontend/src/components/forms/auth/RegisterForm.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const RegisterForm = () => {
117117
{messageError && <p className="text-orange font-bold text-lg">{messageError}</p>}
118118

119119
<Input
120-
dataTestId="lastNameRegister"
120+
data-testid="lastNameRegister"
121121
theme="dark"
122122
type="text"
123123
placeholder="Nom"
@@ -126,7 +126,7 @@ const RegisterForm = () => {
126126
onChange={(e) => setForm({ ...form, lastName: e.target.value })}
127127
></Input>
128128
<Input
129-
dataTestId="firstNameRegister"
129+
data-testid="firstNameRegister"
130130
theme="dark"
131131
type="text"
132132
placeholder="Prénom"
@@ -135,7 +135,7 @@ const RegisterForm = () => {
135135
onChange={(e) => setForm({ ...form, firstName: e.target.value })}
136136
></Input>
137137
<Input
138-
dataTestId="emailRegister"
138+
data-testid="emailRegister"
139139
theme="dark"
140140
type="text"
141141
placeholder="Adresse email"
@@ -144,7 +144,7 @@ const RegisterForm = () => {
144144
onChange={(e) => setForm({ ...form, email: e.target.value })}
145145
></Input>
146146
<Input
147-
dataTestId="birthdayRegister"
147+
data-testid="birthdayRegister"
148148
theme="dark"
149149
type="date"
150150
placeholder="Date de naissance"
@@ -153,7 +153,7 @@ const RegisterForm = () => {
153153
onChange={(e) => setForm({ ...form, date_of_birth: e.target.value })}
154154
></Input>
155155
<Input
156-
dataTestId="passwordRegister"
156+
data-testid="passwordRegister"
157157
theme="dark"
158158
type="password"
159159
placeholder="Mot de passe"
@@ -162,7 +162,7 @@ const RegisterForm = () => {
162162
onChange={(e) => setForm({ ...form, password: e.target.value })}
163163
></Input>
164164
<Input
165-
dataTestId="passwordConfirmRegister"
165+
data-testid="passwordConfirmRegister"
166166
theme="dark"
167167
type="password"
168168
placeholder="Confirmation du mot de passe"

frontend/src/components/utils/Button.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { IconProps } from "./Icon";
44
import Icon from "./Icon";
55

66
type ButtonType = HTMLButtonElement["type"];
7-
type ButtonProps = {
7+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
88
onClick?: MouseEventHandler<HTMLButtonElement>;
99
text?: string;
1010
colour?: ColourScheme["colour"];
@@ -16,7 +16,6 @@ type ButtonProps = {
1616
big?: boolean;
1717
small?: boolean;
1818
disabled?: boolean;
19-
dataTestId?: string;
2019
};
2120

2221
export default function Button({

frontend/src/components/utils/Input.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1313
label?: string;
1414
icon?: IconTypes;
1515
disabled?: boolean;
16-
dataTestId?: string;
1716
}
1817

1918
export default function Input({
@@ -28,7 +27,6 @@ export default function Input({
2827
placeholder,
2928
icon,
3029
disabled = false,
31-
dataTestId,
3230
...props
3331
}: InputProps) {
3432
const baseStyles =
@@ -66,7 +64,6 @@ export default function Input({
6664
className={`${baseStyles} ${themeStyles} ${disabledStyles} ${errorStyles} ${className}`}
6765
name={name}
6866
placeholder={placeholder}
69-
data-testid={dataTestId}
7067
{...props}
7168
/>
7269
{icon && (

0 commit comments

Comments
 (0)