Open snps-halkoaho opened 1 year ago
Maybe your own test runner makes "real" clicks?
Our testing suite uses both simulated and real click events. Is it possible to set the isTrusted
property via Jest APIs?
@adidahiya As far as I understand, it's not possible to set isTrusted
to be true
in Jest.
Hello, and thank you for the excellent library! I've found a problem that affects our tests. It's appeared recently and seems pretty straightforward.
Environment
Steps to reproduce
Actual behavior
Popover doesn't close.
Expected behavior
Popover closes and asserting that its contents disappeard passes.
Possible solution
I think the reason is this fix: https://github.com/palantir/blueprint/pull/6092 .
e.isTrusted
is false in tests (we are using Jest). This makesthis.isSimulatedButtonClick(e);
true, which makes Popover ignore the click when trying to close it. Maybe your own test runner makes "real" clicks?