-
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
testlib: using b.mouse(..., ctrlKey=True)
keeps the ctrl modifier active
#21187
Comments
Can you reproduce this locally? If so, can you please paste a full run with if ctrlKey:
keys_pre.append(key("keyDown", "Control"))
keys_post.append(key("keyUp", "Control")) seems correct to me, I don't see typos. In the log I'd like to see that the "keyUp Control" is actually ran. If so, then it rather smells like a firefox bug. Do you know, is that only Control, or also affects Alt/Shift/Meta? |
Another example which is still around is https://github.com/cockpit-project/cockpit-files/blob/main/test/check-application#L819 |
Ok, this still happens. Running the following code in a test which selects 3 files. Then it single clicks on fourth file. What should happen is that the 3 selected files get deselected and this now clicked on file is selected (and the only selected one). testlib.sit()
# Select multiple files
m.execute("touch /home/admin/newfile.txt /home/admin/morenewfile.txt")
b.click("[data-item='newdir']")
b.mouse("[data-item='newfile.txt']", "click", ctrlKey=True)
b.wait_in_text(".files-footer-info", "2 files selected")
b.mouse("[data-item='tmplink']", "click", ctrlKey=True)
b.wait_in_text(".files-footer-info", "3 files selected")
testlib.sit()
b.mouse("[data-item='morenewfile.txt']", "click", ctrlKey=False)
testlib.sit() Looking at the events fired by clicking I can see that first click correctly has Here is the relevant part of trace which to me looks correct. First and last click doesn't have any modifiers, second and third does. So indeed it seems to be correct on our side and likely is a bug on the firefox side? The modifier part is:
|
and running the same code (without |
Explain what happens
When using
b.mouse()
with ctrl key modifier in Firefox the modifier is kept active for all futureb.mouse()
calls.I am not sure if this is a bug in testlib or something in firefox bidi driver.
Relevant testing farm failure:
https://artifacts.dev.testing-farm.io/650d6b68-b518-414e-9ff2-d2b8f8d73939/
Relevant part of testNavigation:
First in the test ctrl modifier is used
and then later on in the test there is another use of
b.mouse
this time with ctrlKey=False (default). Testingfarm log shows the test fails here.problem also persists when explicitly setting it to false in the function call.
The bidi input action looks good to me.
Version of Cockpit
327
Where is the problem in Cockpit?
None
Server operating system
None
Server operating system version
No response
What browsers are you using?
Firefox
System log
No response
The text was updated successfully, but these errors were encountered: