Open huang-julien opened 6 months ago
src/commands/realPress.ts
, a new function isEmoji
was added. This function checks if a given character is an emoji.getKeyDefinition
function in src/commands/realPress.ts
was updated to handle unsupported keys. If the key is a single character or an emoji, it will return a key definition object with appropriate values.KeyOrShortcut
type in src/commands/realPress.ts
was updated to include arrays of keys.realPress
function in src/commands/realPress.ts
now accepts string
or string[]
as the keyOrShortcut
parameter.src/commands/realType.ts
, the import statement for keyCodeDefinitions
and realPress
was updated to use a named import for KeyOrShortcut
from realPress.ts
.assertChar
function in src/commands/realType.ts
was removed, along with its usage.I really do not understand why because if you don't type a real keycode it is better to use cy.type simply. Plus I expect at least few tests to be written I am not sure it is even working — you need to pass text separately in the CDP
oh cy.type doesn't work with things like CKeditor. But i do get why you quite reluctant to add a change to it 🙂
Some very simple test were added but that's probably not enough ? I'm good with closing it if you feel that this shouldn't be supported
I'm okay but we need to support as much tests as we need like switching between supported keystrokes and not supported, entering utf-8 characters and so on
Hello :wave:
This PR aims to add a fallback to
String.charCodeAt
if the key is a single character or a unicode char and if it is not in theKeyCodeDefinition
.This would resolve #614.