Angular checkbox input disabled attribute -


inside of 1 component of angular (4) application, have template checkbox input in it, disabled attribute bind variable :

<input type="checkbox" name="test" [disabled]=isdisabled"> 

this input has behavior wouls expect : if "isdisabled" variable true, checkbox disabled , oppposite.

but, when try test behavior, disabled attribute of input false. test false (checkbox() sending checkbox):

expect(checkbox().disabled).tobetruthy(); 

the way can check verify attribute "ng-reflect-is-disabled". :

expect(checkbox().getattribute('ng-reflect-is-disabled').tobetruthy(); 

it works, find quite ugly.

i wonder if normal behavior when disabled attribute managed angular ? thank !


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -