-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
Describe the bug
When using vitest browser mode, the following test fails:
import { expect, test } from 'vitest'
import { render } from 'vitest-browser-vue'
import HelloWorld from './HelloWorld.vue'
import { userEvent } from '@vitest/browser/context'
test('renders name', async () => {
const { getByText, getByRole } = render(HelloWorld, {
props: { name: 'Vitest' },
})
await userEvent.type(getByRole('textbox'), "éèù")
})Fails with Error: keyboard.down: Unknown key: "é"
é is a valid key in AZERTY french keyboards. I cannot use userEvent.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
pnpm i
pnpm test:browser
get error message Error: keyboard.down: Unknown key: "é"
System Info
System:
OS: macOS 15.1
CPU: (10) arm64 Apple M2 Pro
Memory: 796.86 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.5.0 - ~/.nvm/versions/node/v20.5.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.5.0/bin/yarn
npm: 10.1.0 - ~/.nvm/versions/node/v20.5.0/bin/npm
pnpm: 9.12.1 - ~/Library/pnpm/pnpm
bun: 1.1.29 - ~/.bun/bin/bun
Browsers:
Safari: 18.1
npmPackages:
@vitejs/plugin-vue: ^5.1.4 => 5.1.4
@vitest/browser: ^2.1.4 => 2.1.4
@vitest/eslint-plugin: 1.1.7 => 1.1.7
vite: ^5.4.10 => 5.4.10
vitest: ^2.1.4 => 2.1.4Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)