-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Use real mouse events in tests on Firefox #20889
Commits on Aug 19, 2024
-
tools: Fix license typo in debian/copyright
Thanks Michael Biebl for pointing out! https://bugs.debian.org/1078801
Configuration menu - View commit details
-
Copy full SHA for 2212786 - Browse repository at this point
Copy the full SHA 2212786View commit details -
test: Make TestServices.test{Basic,Logs}{,User} destructive
These tests assume "No log entries" for test.service initially. This isn't true when running `testLogs{,User}` or `testBasic{,User}` more than once on the same machine. After an hour of effort trying various tricks with overlaying /{run,var}/log/journal and restarting journald it turns out that there just simply isn't any reliable way of resetting the journal. So give in, and make these four tests destructive.
Configuration menu - View commit details
-
Copy full SHA for 4c133d4 - Browse repository at this point
Copy the full SHA 4c133d4View commit details -
storage: Drop obsolete
pointerEvents: none
hack in controlsThis was introduced in commit 66ff88e mostly for cockpit-machines. Since then most of these hacks disappeared, but there's two left. `StorageControl` avoids that problem by wrapping the `Tooltip` contents in an extra span, so that tooltips work for disabled elements. This avoids a race condition: When the `excuse` is empty, but there's a spinner, then the button is not formally disabled, but clicks go into the void. This fixes the flaky TestStorageLuksDestructive.testLuks1Slots.
Configuration menu - View commit details
-
Copy full SHA for db19fc6 - Browse repository at this point
Copy the full SHA db19fc6View commit details -
test: Close superuser dialog in TestSuperuser.testNotAdmin
A normal user can't click on "Logout" while the modal superuser dialog is open. Close the dialog first. This worked because our `ph_mouse()` approach is cheating, but it won't work when we do real clicks.
Configuration menu - View commit details
-
Copy full SHA for e0462ce - Browse repository at this point
Copy the full SHA e0462ceView commit details -
test: Fix file chooser test in TestPages.testReactPatterns
This was previously doing a wild mix of closing the upper (file-ac) selector while the lower (file-ac-preselected) was already open, which isn't something that a user can do with a real mouse (only with our `ph_mouse()` fake API). It also clicked around wildly without waiting for the changes, which was racy. Fix that by closing the upper selector first to conclude that check, and then extend the clicks into the lower selector with comments what they are supposed to do, and assertions what should happen after them. The multiple clicks paper over a bug in that widget: The first time you open it after the directory got created it still says "no such file or directory", and only reloads after closing and re-opening it. We should fix that, but not in this commit -- just capture the status quo.
Configuration menu - View commit details
-
Copy full SHA for ed019b5 - Browse repository at this point
Copy the full SHA ed019b5View commit details -
test: Avoid tooltip hiding kebab in TestServices
When moving the mouse into the On/Off switch for clicking, the tooltip appears. That lies on top of the kebab, which hence becomes not directly clickable. Avoid that by moving the mouse out of the On/Off switch again after clicking.
Configuration menu - View commit details
-
Copy full SHA for aea018d - Browse repository at this point
Copy the full SHA aea018dView commit details -
test: Fix double service removal in TestFirewall.testAddServices
Don't remove the pop3 service simultaneously via the CLI *and* Cockpit -- that's a clear race condition. We already check that the UI reacts to `firewall-cmd --remove-service`, so just drop that bit.
Configuration menu - View commit details
-
Copy full SHA for 7b95524 - Browse repository at this point
Copy the full SHA 7b95524View commit details -
test: Avoid popover click bug in TestJournal.testBasic
Clicking the popover in the advanced search form closes the whole form with a real human mouse interaction, as well as with a simulated click through BiDi. This doesn't happen with `ph_mouse()` though (so that doesn't test reality). This is some PatternFly bug, and not entirely obvious how to fix it. For now, close the popover the same way as opening it, with the (i) icon.
Configuration menu - View commit details
-
Copy full SHA for 6c64535 - Browse repository at this point
Copy the full SHA 6c64535View commit details
Commits on Aug 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d2b1324 - Browse repository at this point
Copy the full SHA d2b1324View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 411c9f6 - Browse repository at this point
Copy the full SHA 411c9f6View commit details