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
Post a Comment