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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check type with special characters #31
Comments
First of all thank you for merging my PR. Yes, I have been thinking about this today. I think the behaviour of entering special character differ per language of keyboard being used. Do we just want to restrict this to the probably most used American keyboard? Beside of that do we want to enter capital letters correctly too? E.g. Shift + Letter? What about the enter key for a \n? |
That's a good point. I think supporting every possible keyboard layout out there is too much work and out of the scope of this project. I would just assume that if a character is typed, it's because it was somewhere on the keyboard. That includes uppercase letters. Cypress has support for special characters like enter. We could think to do the same https://docs.cypress.io/api/commands/type.html#Arguments |
Yes, that's true. I will have a closer look at the Cypress command for |
While looking into a |
The thing is this library is based on |
Yeah, that's a good point. Maybe I borrow some ideas from that library :) |
Sorry, I haven't had a need yet to support special characters. I might consider with adding support {backspace} / {ctrl} {meta} etc first. I will have a closer look at how it works in Cypress again. |
Hi, is there any progress on this? What have people been doing to simulate enter key presses if |
Yes, I have some of it in a local branch at work |
There is no on going work related to support "press enter" action? I will be happy to contribute if there is nothing in place yet, nevertheless, looks odd because it should be a very common usage case. Isn't? What does the people do now? I have tried with: fireEvent.keyDown(searchInput, {
charCode: 13,
code: 13,
key: 'Enter',
keyCode: 13,
}) And it doesn't work to trigger the submit of the form I have UPDATE: there is a submit event |
馃帀 This issue has been resolved in version 11.1.0 馃帀 The release is available on:
Your semantic-release bot 馃摝馃殌 |
userEvent.type
writes text correctly. But I'm not sure how it behaves with special characters like猫
or 馃憤 .It would be good to have tests covering these cases
The text was updated successfully, but these errors were encountered: