-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add pageUtils.pressKeys
to playwright utils
#49009
Conversation
Size Change: 0 B Total Size: 1.34 MB ℹ️ View Unchanged
|
Flaky tests detected in 99fd7377b12d5f7b71f51237dcf215eb7997d4ad. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4392727436
|
99fd737
to
1dab086
Compare
1dab086
to
f0d0d56
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.
A great improvement. Thank you, @kevin940726!
TY! ❤️ |
What?
Add
pageUtils.pressKeys
toe2e-test-utils-playwright
. The API has the following signature:key
is a+
separated string and contain modifiers likeprimary
andsecondary
. It also convertsTab
toAlt+Tab
in macOS Webkit automatically under the hood (see #48067 (comment)). Passing a number > 1 totimes
can send the keys multiple times.This function replaces the old
pressKeyWithModifiers
andpressKeyTimes
API.Why?
Inspired by the comment in #48035 (comment) by @WunderBart. This also hides the complexity of dealing with tabbing orders in macOS webkit as mentioned in #48067 (comment).
How?
Introduce a new API and deprecate the old ones.
Testing Instructions
CI should pass