-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vitest browser mode userEvent type not recognizing special chars #6871
Comments
it looks like it's a duplicate of microsoft/playwright#7396 but it puzzles me a bit why it does work with This works for example: import { test, expect } from '@playwright/experimental-ct-react'
test('test', async ({ mount, page }) => {
/** ... **/
const text = 'éè'
for (const c of text) {
await page.keyboard.type(c)
}
/** ... **/ it makes me wonder how could I achieve the same "keypress by keypress" test using userEvent from vitest? |
Vitest's Okay, maybe this is a magic we need to copy. It looks like they fallback to |
@Seboran Can you try this pre-release #6873 (comment)? I'm not exactly sure what Playwright's |
@hi-ogawa i confirm this fixes the bug! 🎉 the Textbox do get the typed keys and I can test my "key by key" behaviour. |
Describe the bug
When using vitest browser mode, the following test fails:
Fails with
Error: keyboard.down: Unknown key: "é"
é
is a valid key in AZERTY french keyboards. I cannot useuserEvent.fill
because I want to test the specific press of special char keys.With playwright I can type the
é
key with their equivalent method.Reproduction
clone https://github.com/Seboran/special-chars-vitest
get error message
Error: keyboard.down: Unknown key: "é"
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: