Add pageUtils.pressKeys to playwright utils#49009
Merged
Merged
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
Mamaduka
approved these changes
Mar 14, 2023
Member
Mamaduka
left a comment
There was a problem hiding this comment.
A great improvement. Thank you, @kevin940726!
Contributor
|
TY! ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Add
pageUtils.pressKeystoe2e-test-utils-playwright. The API has the following signature:keyis a+separated string and contain modifiers likeprimaryandsecondary. It also convertsTabtoAlt+Tabin macOS Webkit automatically under the hood (see #48067 (comment)). Passing a number > 1 totimescan send the keys multiple times.This function replaces the old
pressKeyWithModifiersandpressKeyTimesAPI.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