Skip to content

Commit 7d1c5a1

Browse files
committed
change error test ids
1 parent 367e1e7 commit 7d1c5a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/fizz-buzz/fizz-buzz.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
data-testid="input-max-number" />
1414

1515
@if(formGroup.controls.maxNumber.errors?.['required']) {
16-
<mat-error data-testid="error-required-max-number">
16+
<mat-error data-testid="max-number-error-required">
1717
Please enter a valid number
1818
</mat-error>
1919
}
@@ -32,7 +32,7 @@
3232
[maxLength]="30"
3333
[attr.data-testid]="'input-word-' + idx"/>
3434
@if (group.controls.wordToPrint.errors){
35-
<mat-error>
35+
<mat-error [attr.data-testid]="'word-error-' + idx">
3636
Please enter a valid word
3737
</mat-error>
3838
}
@@ -48,12 +48,12 @@
4848
required
4949
[attr.data-testid]="'input-multiple-' + idx" />
5050
@if (group.controls.multiple.errors?.['required'] || group.controls.multiple.errors?.['min']) {
51-
<mat-error [attr.data-testid]="'error-required-multiple' + idx">
51+
<mat-error [attr.data-testid]="'multiple-error-required-' + idx">
5252
Please valid a number
5353
</mat-error>
5454
}
5555
@else if (group.controls.multiple.errors?.['duplicates']) {
56-
<mat-error [attr.data-testid]="'error-required-duplicate' + idx">Duplicate number</mat-error>
56+
<mat-error [attr.data-testid]="'multiple-error-duplicate-' + idx">Duplicate number</mat-error>
5757
}
5858
</mat-form-field>
5959
<br />

0 commit comments

Comments
 (0)