@@ -928,7 +928,7 @@ describe('MatMdcInput with forms', () => {
928
928
expect ( testComponent . formControl . untouched ) . toBe ( true , 'Expected untouched form control' ) ;
929
929
expect ( containerEl . querySelectorAll ( 'mat-error' ) . length ) . toBe ( 0 , 'Expected no error message' ) ;
930
930
expect ( inputEl . getAttribute ( 'aria-invalid' ) )
931
- . toBe ( 'false' , 'Expected aria-invalid to be set to "false" .' ) ;
931
+ . toBe ( null , 'Expected aria-invalid not to be present .' ) ;
932
932
} ) ) ;
933
933
934
934
it ( 'should display an error message when the input is touched and invalid' , fakeAsync ( ( ) => {
@@ -997,7 +997,7 @@ describe('MatMdcInput with forms', () => {
997
997
expect ( component . formGroup . invalid ) . toBe ( true , 'Expected form control to be invalid' ) ;
998
998
expect ( containerEl . querySelectorAll ( 'mat-error' ) . length ) . toBe ( 0 , 'Expected no error message' ) ;
999
999
expect ( inputEl . getAttribute ( 'aria-invalid' ) )
1000
- . toBe ( 'false' , 'Expected aria-invalid to be set to "false". ' ) ;
1000
+ . toBe ( null , 'Expected aria-invalid not to be present ' ) ;
1001
1001
expect ( component . formGroupDirective . submitted )
1002
1002
. toBe ( false , 'Expected form not to have been submitted' ) ;
1003
1003
@@ -1081,7 +1081,7 @@ describe('MatMdcInput with forms', () => {
1081
1081
expect ( describedBy ) . toBe ( errorIds ) ;
1082
1082
} ) ) ;
1083
1083
1084
- it ( 'should not set `aria-invalid` to true if the input is empty' , fakeAsync ( ( ) => {
1084
+ it ( 'should not set `aria-invalid` if the input is empty' , fakeAsync ( ( ) => {
1085
1085
// Submit the form since it's the one that triggers the default error state matcher.
1086
1086
dispatchFakeEvent ( fixture . nativeElement . querySelector ( 'form' ) , 'submit' ) ;
1087
1087
fixture . detectChanges ( ) ;
@@ -1090,7 +1090,7 @@ describe('MatMdcInput with forms', () => {
1090
1090
expect ( testComponent . formControl . invalid ) . toBe ( true , 'Expected form control to be invalid' ) ;
1091
1091
expect ( inputEl . value ) . toBeFalsy ( ) ;
1092
1092
expect ( inputEl . getAttribute ( 'aria-invalid' ) )
1093
- . toBe ( 'false' , 'Expected aria-invalid to be set to "false". ' ) ;
1093
+ . toBe ( null , 'Expected aria-invalid not to be present ' ) ;
1094
1094
1095
1095
inputEl . value = 'not valid' ;
1096
1096
fixture . detectChanges ( ) ;
0 commit comments