Skip to content

Commit

Permalink
chore: downgrade testing library user event
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Jan 2, 2025
1 parent 2b129f2 commit bdbe31d
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 76 deletions.
2 changes: 1 addition & 1 deletion packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@testing-library/user-event": "^13.5.0",
"@types/archiver": "^6.0.2",
"@types/configstore": "^5.0.1",
"@types/debug": "^4.1.12",
Expand Down
3 changes: 2 additions & 1 deletion packages/sanity/src/core/form/inputs/BooleanInput.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ describe('Keyboard accessibility', () => {
})

await userEvent.tab()
// @TODO figure out why upgrading to `@testing-library/user-event` v14 breaks this test
await userEvent.keyboard('{space}')
expect(onChange).toBeCalled()
})
Expand Down Expand Up @@ -200,7 +201,7 @@ describe('readOnly property', () => {
// Keyboard event
await userEvent.tab({shift: true})
await userEvent.tab()
await userEvent.keyboard('{space}')
await userEvent.keyboard('{Space}')
expect(onChange).toBeCalled()
})

Expand Down
Loading

0 comments on commit bdbe31d

Please sign in to comment.