-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix e2e tests in dev mode * Fix package-lock.json Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
- Loading branch information
1 parent
d86ecdb
commit 46a5bde
Showing
5 changed files
with
49 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
48 changes: 48 additions & 0 deletions
48
packages/e2e-test-utils-playwright/src/page-utils/keycodes.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* This filed is partially copied from @wordpress/keycodes to keep the package | ||
* (internal-)dependencies free. | ||
*/ | ||
|
||
/** | ||
* Keycode for ALT key. | ||
*/ | ||
export const ALT = 'alt'; | ||
|
||
/** | ||
* Keycode for CTRL key. | ||
*/ | ||
export const CTRL = 'ctrl'; | ||
|
||
/** | ||
* Keycode for COMMAND key. | ||
*/ | ||
export const COMMAND = 'meta'; | ||
|
||
/** | ||
* Keycode for SHIFT key. | ||
*/ | ||
export const SHIFT = 'shift'; | ||
|
||
/** | ||
* Object that contains functions that return the available modifier | ||
* depending on platform. | ||
*/ | ||
export const modifiers: Record< | ||
string, | ||
( _isApple: () => boolean ) => string[] | ||
> = { | ||
primary: ( _isApple ) => ( _isApple() ? [ COMMAND ] : [ CTRL ] ), | ||
primaryShift: ( _isApple ) => | ||
_isApple() ? [ SHIFT, COMMAND ] : [ CTRL, SHIFT ], | ||
primaryAlt: ( _isApple ) => | ||
_isApple() ? [ ALT, COMMAND ] : [ CTRL, ALT ], | ||
secondary: ( _isApple ) => | ||
_isApple() ? [ SHIFT, ALT, COMMAND ] : [ CTRL, SHIFT, ALT ], | ||
access: ( _isApple ) => ( _isApple() ? [ CTRL, ALT ] : [ SHIFT, ALT ] ), | ||
ctrl: () => [ CTRL ], | ||
alt: () => [ ALT ], | ||
ctrlShift: () => [ CTRL, SHIFT ], | ||
shift: () => [ SHIFT ], | ||
shiftAlt: () => [ SHIFT, ALT ], | ||
undefined: () => [], | ||
}; |
This file contains 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
This file contains 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
46a5bde
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.
Flaky tests detected in 46a5bde.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9579119437
📝 Reported issues:
/test/e2e/specs/editor/blocks/comments.spec.js