-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/testingarea: material/input
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
Setting the value of a number input to a negative value using MatInputHarness.setValue sets the value to the opposite (positive) on the form control bound to the input.
Seems related to #19314
Reproduction
Steps to reproduce:
- use a mat-form-field with formControl
- in the test, set a negative value using the MatInputHarness.setValue('-3')
- formControl value will be positive (3), while MatInputHarness.getValue() will return the correct negative value (-3)
https://stackblitz.com/edit/angular-13-starter-x-3avuxy?file=src%2Fapp%2Fapp.component.spec.ts (run ng test)
Expected Behavior
Form control value should be set to a negative value
Actual Behavior
Form control value is set to a positive value
Environment
- Angular: ~13.1.0
- CDK/Material: ^13.1.1
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/testingarea: material/input