Skip to content

Commit 615ea38

Browse files
committed
f
1 parent ed99428 commit 615ea38

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

web/src/components/common/Checkbox.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const Checkbox: React.FC<CheckboxProps> = ({
2525
labelClassName = '',
2626
id,
2727
label,
28-
dataTestId,
2928
helpText,
3029
}) => {
3130
const { settings } = useSettings();
@@ -41,7 +40,7 @@ const Checkbox: React.FC<CheckboxProps> = ({
4140
onChange={onChange}
4241
disabled={disabled}
4342
className={`h-4 w-4 focus:ring-offset-2 border-gray-300 rounded ${className}`}
44-
data-testid={dataTestId}
43+
data-testid={`bool-input-${id}`}
4544
style={{
4645
color: themeColor,
4746
'--tw-ring-color': themeColor,

web/src/components/common/Input.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const Input: React.FC<InputProps> = ({
3535
labelClassName = '',
3636
id,
3737
label,
38-
dataTestId,
3938
helpText,
4039
}) => {
4140
const { settings } = useSettings();
@@ -71,7 +70,7 @@ const Input: React.FC<InputProps> = ({
7170
'--tw-ring-color': themeColor,
7271
'--tw-ring-offset-color': themeColor,
7372
} as React.CSSProperties}
74-
data-testid={dataTestId}
73+
data-testid={`text-input-${id}`}
7574
/>
7675
</div>
7776
{error && <p className="mt-1 text-sm text-red-500">{error}</p>}

web/src/components/common/Radio.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const Radio: React.FC<RadioProps> = ({
2828
labelClassName = '',
2929
id,
3030
label,
31-
dataTestId,
3231
helpText,
3332
}) => {
3433
const { settings } = useSettings();
@@ -51,7 +50,7 @@ const Radio: React.FC<RadioProps> = ({
5150
onChange={onChange}
5251
disabled={disabled}
5352
className={`h-4 w-4 focus:ring-offset-2 border-gray-300 ${className}`}
54-
data-testid={dataTestId ? `${dataTestId}-${option.name}` : undefined}
53+
data-testid={`radio-input-${option.name}`}
5554
style={{
5655
color: themeColor,
5756
'--tw-ring-color': themeColor,

web/src/components/common/Textarea.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const Textarea = ({
3131
labelClassName = '',
3232
id,
3333
label,
34-
dataTestId,
3534
helpText,
3635
}: TextareaProps) => {
3736
const { settings } = useSettings();
@@ -60,7 +59,7 @@ const Textarea = ({
6059
'--tw-ring-color': themeColor,
6160
'--tw-ring-offset-color': themeColor,
6261
} as CSSProperties}
63-
data-testid={dataTestId}
62+
data-testid={`textarea-input-${id}`}
6463
/>
6564
{error && <p className="mt-1 text-sm text-red-500">{error}</p>}
6665
{helpText && !error && <p className="mt-1 text-sm text-gray-500">{helpText}</p>}

web/src/components/wizard/config/ConfigurationStep.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ const ConfigurationStep: React.FC<ConfigurationStepProps> = ({ onNext }) => {
170170
<Input
171171
value={getDisplayValue(item)}
172172
onChange={handleInputChange}
173-
dataTestId={`text-input-${item.name}`}
174173
/>
175174
);
176175

@@ -179,7 +178,6 @@ const ConfigurationStep: React.FC<ConfigurationStepProps> = ({ onNext }) => {
179178
<Textarea
180179
value={getDisplayValue(item)}
181180
onChange={handleInputChange}
182-
dataTestId={`textarea-input-${item.name}`}
183181
/>
184182

185183
);
@@ -189,7 +187,6 @@ const ConfigurationStep: React.FC<ConfigurationStepProps> = ({ onNext }) => {
189187
<Checkbox
190188
checked={getEffectiveValue(item) === '1'}
191189
onChange={handleCheckboxChange}
192-
dataTestId={`bool-input-${item.name}`}
193190
/>
194191
);
195192

@@ -200,7 +197,6 @@ const ConfigurationStep: React.FC<ConfigurationStepProps> = ({ onNext }) => {
200197
value={getEffectiveValue(item)}
201198
options={item.items}
202199
onChange={e => handleRadioChange(item.name, e)}
203-
dataTestId={`radio-input-${item.name}`}
204200
/>
205201
);
206202
}

0 commit comments

Comments
 (0)