question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Check type with special characters

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
duranmlacommented, Feb 11, 2020

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 fireEvent.submit(searchInput) check all events at https://github.com/testing-library/dom-testing-library/blob/master/src/events.js

2reactions
hatched-dannycommented, Oct 16, 2019

Hi, is there any progress on this? What have people been doing to simulate enter key presses if userEvent.type(textArea, "Testing!{enter}"); doesn’t work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Check if a string consists only of special characters
Naive Approach: Iterate over the string and check if the string contains only special characters or not. Follow the steps below to solve...
Read more >
How to type special characters on a Windows 10 PC
Use the character map​​ To access it on your Windows 10 system: Type “character” in your search field and then select the Character...
Read more >
Check if String contains Special Characters in JavaScript
To check if a string contains special characters, call the `test()` method on a regular expression that matches any special character.
Read more >
Check for special characters in string - javascript
If the string contains only the special characters then it returns true , but if the string contains something else like alphanumeric chars...
Read more >
How to Use Special Characters in Windows Documents
Method 2 · In your document, position the insertion point where you want the special character to appear. · Press and hold down...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found