Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Use real mouse events in tests on Firefox
Our years-old `ph_mouse()` helper is cheating: It completely side-steps the browser UI and directly synthesizes `MouseEvent`s in JavaScript. This allowed funny things like clicking on a main page element while a dialog is open (which you can't normally do as the dialog is modal), clicking an element which is disabled in some non-standard way, or clicking through a tooltip. Make this more realistic by using the BiDi API for synthesizing mouse events. This works fine with Firefox, but is unfortunately completely broken in iframes with Chromium: https://issues.chromium.org/issues/359616812 Specifying precise coordinates is not currently implemented. `ph_mouse()` always clicks on the top left corner, while webdriver's `pointerMove` puts (0,0) in the center of the element. This can be done with a little extra calculation of the `getBoundingRect()`, but only very few tests like `TestStorageLvm2.testMaxLayoutGrowth` rely on that. For these tests, continue to use `ph_mouse()`. https://issues.redhat.com/browse/COCKPIT-1158
- Loading branch information