-
Notifications
You must be signed in to change notification settings - Fork 84
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: add shortcut for pressing multiple keys simultaneously #8536
test: add shortcut for pressing multiple keys simultaneously #8536
Conversation
test/test-runner-commands/index.js
Outdated
export * from '@web/test-runner-commands'; | ||
|
||
export async function sendKeys(options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to use the same approach to extend the API of sendMouse to support
- const { x, y } = middleOfNode(button)
- sendMouse({ type: 'click', position: [Math.floor(x), Math.floor(y)] });
+ sendMouse({ type: 'click', element: button });
0126cec
to
ff44b45
Compare
344a6d0
to
f474ed6
Compare
f474ed6
to
a39763e
Compare
632b112
to
3a885ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One case reported above still seems not replaced:
web-components/packages/grid/test/disabled.common.js
Lines 85 to 87 in 8328bac
await sendKeys({ down: 'Shift' }); | |
await sendKeys({ press: 'Tab' }); | |
await sendKeys({ up: 'Shift' }); |
Thanks, replaced. |
9d0781a
to
7f6a178
Compare
7f6a178
to
b7e2931
Compare
Quality Gate failedFailed conditions |
Hi @vursen and @web-padawan, when i performed cherry-pick to this commit to 24.6, i have encountered the following issue. Can you take a look and pick it manually? |
Hi @vursen and @web-padawan, when i performed cherry-pick to this commit to 24.5, i have encountered the following issue. Can you take a look and pick it manually? |
This ticket/PR has been released with Vaadin 24.7.0.alpha7 and is also targeting the upcoming stable 24.7.0 version. |
Description
Extends the default
sendKeys
implementation to support pressing multiple keys simultaneously in Puppeter and Playwright when provided in the formatShift+Tab
. In screenshot tests, however, this functionality will still be unavailable because WebDriver's sendKeys implementation does not provide an API for holding keys down.Depends on
Type of change