Releases: testing-library/user-event
Releases · testing-library/user-event
v14.0.1
v14.0.0
14.0.0 (2022-03-29)
⚠ BREAKING CHANGES
- APIs always return a Promise.
- pointer:
skipPointerEvents
has been removed.
UsepointerEventsCheck: PointerEventsCheckLevel.Never
instead. - upload:
init
parameter has been removed fromuserEvent.upload
. - upload:
applyAccept
defaults totrue
. - The
userEvent.paste
API has new parameters. {ctrl}
,{del}
,{esc}
no longer describe a key. Use{Control}
,{Delete}
,{Escape}
instead.{alt}
,{ctrl}
,{meta}
,{shift}
no longer imply not releasing the key. Use{Alt>}
,{Control>}
,{Meta>}
,{Shift>}
instead.init
parameter has been removed from these APIs:userEvent.click
userEvent.dblClick
userEvent.tripleClick
userEvent.hover
userEvent.unhover
userEvent.selectOptions
userEvent.deselectOptions
userEvent.upload
no longer supportsclickInit
as part of itsinit
parameter.- Behavior for special key descriptor
{selectall}
has been removed. - Support for
keyCode
property on keyboard events has been removed. - An error is thrown when calling
userEvent.clear
on an element which is not editable. - An error is thrown when event handlers prevent
userEvent.clear
from focussing/selecting content. - tab: The
focusTrap
option has been removed fromuserEvent.tab()
. - type:
userEvent.type
does no longer move the cursor
if used withskipClick=false
and withoutinitialSelectionStart
. - The implementation of pointer related APIs was replaced.
This might break tests relying on unintended side-effects of the previous implementation. - Support for node 10 was removed as it reached its end-of-life.
Features
- async APIs (#790) (86860cc)
- keep track of document state in UI (#747) (73e62d0)
- rewrite selection handling (#776) (968c2c4)
- event: support
beforeinput
(#851) (8890bd6) - add
pointer
API (#750) (c12ee44) - add
setup
API (#746) (719ba03) - add
userEvent.copy
anduserEvent.cut
(#787) (8727a2d) - add
userEvent.tripleClick
API (#773) (0badabd) - apply modifier keys in pointer events (#751) (e33eb86)
- keyboard: add
[Tab]
support (#767) (87470ff) - keyboard: apply modifier state (#815) (e9635f6)
- keyboard: move cursor and delete content in contenteditable (#822) (b83b259)
- keyboard: select all per
{Control}+[KeyA]
(#774) (ea9b18a) - pointer: change selection per pointer (#763) (17fb8b1)
- pointer: introduce
pointerEventsCheck
option (#823) (e2a5f43) - remove support for user provided
MouseEventInit
(#784) (56ebf7d) - paste: replace
userEvent.paste
(#785) (f8fe217) - clear: rewrite
userEvent.clear
API (#779) (1cda1b1) - upload: replace element properties (#794) (543eadb)
Bug Fixes
- check for inherited
:disabled
(#872) (1a00fdf) - clipboard: prevent default behavior on
copy
/cut
(#866) (5423094) - clipboard: prevent default behavior on
paste
(#862) (d3d71ac) - create MouseEvents per
createEvent
(#781) (da5b5b7) - export bundled ESM (#816) (1a5e2a7)
- export types and commonjs bundle (#821) (4f56856)
- keyboard: parse escaped bracket followed by descriptor (#814) (684451f)
- keyboard: parse keyboard input without nesting (#793) (fafa677)
- keyboard: set
KeyboardEvent.charCode
onkeypress
(#771) (55e194a) - keyboard: submit form with
<button/>
on[Enter]
(#808) (eca157a) - log correct docs link for invalid key descriptors (#881) (28d6604)
- maintain cursor position on controlled component (#765) (8f203cc)
- pointer: blur
activeElement
on click outside of focusable (#834) (d64167c) - pointer: consider click context (#850) (ca4482a)
- pointer: fire pointer events on disabled elements (#818) (ef2f4e5)
- pointer: honor click handler on
<label/>
(#810) (2c5d9f1) - pointer: trigger
contextmenu
onmousedown
(#811) (e1c4cad) - prepare document in setup (#753) (65be675)
- remove deprecated keyboard features ([#780](https://github.com/testing-library/user-event/issues/...
v14.0.0-beta.14
14.0.0-beta.14 (2022-03-24)
Bug Fixes
v14.0.0-beta.13
v14.0.0-beta.12
14.0.0-beta.12 (2022-03-01)
Bug Fixes
v14.0.0-beta.11
v14.0.0-beta.10
v14.0.0-beta.9
v14.0.0-beta.8
14.0.0-beta.8 (2022-01-16)
Bug Fixes
v14.0.0-beta.7
14.0.0-beta.7 (2022-01-05)
⚠ BREAKING CHANGES
- pointer:
skipPointerEvents
has been removed.
UsepointerEventsCheck: PointerEventsCheckLevel.Never
instead.