bug(MatCheckboxHarness): isChecked() returns false right after check()
See original GitHub issueReproduction
MatCheckboxHarness.isChecked()
does not return true right after check()
has been called on the harness:
const checkbox = await loader.getHarness(MatCheckboxHarness.with({selector: [formControlName="myFormControl"]}));
await checkbox.check();
expect(await checkbox.isChecked()).toBeTruthy();
If the checkbox gets checked some other controls will be displayed. There is another test testing successfully for these controls after the call to MatCheckboxHarness.check()
. Therefore Iβm sure that check()
is working okay but isChecked()
does not worked as intended.
Expected Behavior
MatCheckboxHarness.isChecked()
returns true right after check() has been called
Actual Behavior
MatCheckboxHarness.isChecked()
returns false right after check() has been called
Environment
-
Angular/CDK/Material: $ npm list --depth 0 smartapplianceenabler@0.0.0 /data/IdeaProjects/SmartApplianceEnabler/src/main/angular βββ @angular-devkit/build-angular@0.901.1 βββ @angular/animations@9.1.1 βββ @angular/cdk@9.2.0 βββ @angular/cli@9.1.1 βββ @angular/common@9.1.1 βββ @angular/compiler@9.1.1 βββ @angular/compiler-cli@9.1.1 βββ @angular/core@9.1.1 βββ @angular/flex-layout@9.0.0-beta.29 βββ @angular/forms@9.1.1 βββ @angular/language-service@9.1.1 βββ @angular/material@9.2.0 βββ @angular/platform-browser@9.1.1 βββ @angular/platform-browser-dynamic@9.1.1 βββ @angular/router@9.1.1 βββ @ngx-translate/core@10.0.2 βββ @ngx-translate/http-loader@3.0.1 βββ @types/jest@24.9.1 βββ @types/node@12.12.35 βββ clockpicker@0.0.7 βββ include-media@1.4.9 βββ UNMET PEER DEPENDENCY jest@24.9.0 βββ jest-preset-angular@8.1.3 βββ jquery@3.5.0 βββ moment@2.24.0 βββ rxjs@6.5.5 βββ ts-node@7.0.1 βββ tslib@1.11.1 βββ tslint@5.11.0 βββ typescript@3.8.3 βββ zone.js@0.10.3
-
Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu 18.04
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Great - looks like you found the source of the problem π
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.