/user-event

πŸ• Simulate user events

Primary LanguageJavaScriptMIT LicenseMIT

user-event

dog

Fire events the same way the user does


Read The Docs | Edit the docs



Build Status Code Coverage version downloads MIT License All Contributors PRs Welcome Code of Conduct Discord

Watch on GitHub Star on GitHub Tweet

Table of Contents

The problem

From testing-library/dom-testing-library#107:

[...] it is becoming apparent the need to express user actions on a web page using a higher-level abstraction than fireEvent

The solution

user-event tries to simulate the real events that would happen in the browser as the user interacts with it. For example userEvent.click(checkbox) would change the state of the checkbox.

The more your tests resemble the way your software is used, the more confidence they can give you.

Installation

With NPM:

npm install --save-dev @testing-library/user-event @testing-library/dom

With Yarn:

yarn add --dev @testing-library/user-event @testing-library/dom

Docs

Read The Docs | Edit the docs

Known limitations

  • No <input type="color" /> support. #423

Issues

Looking to contribute? Look for the Good First Issue label.

πŸ› Bugs

Please file an issue for bugs, missing documentation, or unexpected behavior.

See Bugs

πŸ’‘ Feature Requests

Please file an issue to suggest new features. Vote on feature requests by adding a πŸ‘. This helps maintainers prioritize what to work on.

See Feature Requests

❓ Questions

For questions related to using the library, please visit a support community instead of filing an issue on GitHub.

Contributors

Thanks goes to these people (emoji key):


Giorgio Polvara

πŸ› πŸ’» πŸ“– πŸ€” πŸš‡ πŸ‘€ ⚠️

Weyert de Boer

πŸ’» ⚠️

Tim Whitbeck

πŸ› πŸ’»

MichaΓ«l De Boey

πŸ“–

Michael Lasky

πŸ’» πŸ“– πŸ€”

Ahmad Esmaeilzadeh

πŸ“–

Caleb Eby

πŸ’» πŸ› πŸ‘€

AdriΓ  Fontcuberta

πŸ› ⚠️ πŸ’»

Sky Wickenden

πŸ› πŸ’»

Bodnar Bogdan

πŸ› πŸ’»

Zach Perrault

πŸ“–

Ryan Stelly

πŸ“–

Ben Monro

πŸ’»

Christopher Martin

πŸ’»

Yuancheng Wu

πŸ‘€

MJ

πŸ“–

Jeff McRiffey

πŸ’» ⚠️

Jaga Santagostino

πŸ’» ⚠️

jordyvandomselaar

πŸ’» ⚠️

Ilya Lyamkin

πŸ’» ⚠️

Kenneth LujΓ‘n Rosas

πŸ’» ⚠️

Joe Morgan

πŸ’»

David Hirtle

πŸ’»

whiteUnicorn

πŸ’»

Matej Ε nuderl

πŸ‘€

Rodrigo Pombo

πŸ’»

Jake Verbaten

πŸ’»

Spencer Miskoviak

πŸ“–

Vadim Shvetsov

πŸ€” πŸ’» ⚠️

Greg Shtilman

πŸ’» ⚠️ πŸ›

Ricardo Busquet

πŸ› πŸ’» ⚠️

Doug Bacelar

πŸ’» ⚠️

Kayleigh Ridd

πŸ› πŸ’» ⚠️

Malcolm Kee

πŸ’» πŸ“– ⚠️

kelvinlzhang

πŸ›

Krzysztof

πŸ›

Pontus Lundin

πŸ’» ⚠️

Aleks Hudochenkov

πŸ›

Vijay Kumar Otti

πŸ›

Tom Picton

πŸ› πŸ’» ⚠️

Hung Viet Nguyen

πŸ›

Nick McCurdy

πŸ“† πŸ’¬ πŸ’» ⚠️ πŸ“–

Tim Deschryver

⚠️

Ben Dyer

πŸ’» ⚠️

Dan Kirkham

πŸ’»

Johannesklint

πŸ“–

Juan Carlos Medina

πŸ’» ⚠️

Dade Cook

πŸ’» ⚠️

Leandro Lourenci

πŸ’» ⚠️

Marco Moretti

πŸ’» ⚠️

ybentz

πŸ’» ⚠️

Nasdan

πŸ›

Javier MartΓ­nez

πŸ“–

JΓΆrg Bayreuther

πŸ’» ⚠️ πŸ“–

Lucas Bernalte

πŸ“–

Maxwell Newlands

πŸ’» ⚠️

ph-fritsche

πŸ’» ⚠️

Rey Wright

πŸ› πŸ’»

Niklas Mischkulnig

πŸ’» ⚠️

Pascal Duez

πŸ’»

Malachi Willey

πŸ’» ⚠️

Clark Winters

πŸ“–

lazytype

πŸ’» ⚠️

LuΓ­s Takahashi

πŸ’» ⚠️

Jesu Castillo

πŸ’» ⚠️

Sarah Dayan

πŸ“–

Mirone

πŸ›

Amanda Pouget

πŸ“–

Sonic12040

πŸ’» ⚠️ πŸ“–

Gonzalo D'Elia

πŸ’» ⚠️ πŸ“–

Vasilii Kovalev

πŸ’» πŸ“–

Dale Seo

πŸ“–

Alex Boyce

πŸ’»

Ben Styles

πŸ’» ⚠️

Laura Beatris

πŸ’» ⚠️

Boris Serdiuk

πŸ›

bozdoz

πŸ“– πŸ› ⚠️

Jan Kattelans

πŸ’»

schoeneu

πŸ›

Martin Kapal

πŸ›

Stavros

πŸ›

geoffroymounier

πŸ›

Fergus McDonald

πŸ’»

Robin Ambachtsheer

πŸ›

Mohit

πŸ› πŸ’» ⚠️

Daniel Contreras

πŸ›

Eugene Ghanizadeh

πŸ’»

Victor Repkow

πŸ’»

Jonathan Felchlin

πŸ’»

sydneyjodon-wk

πŸ› πŸ’»

Charles Magic Woo

πŸ›

mkurcius

πŸ’»

Tim Fischbach

πŸ›

Brian Donovan

πŸ’»

Eric Wang

πŸ’»

Jesper Orb

πŸ’»

Johannes Fischer

πŸ’»

Andrew D.

πŸ’»

Patrick LizoΕ„

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

LICENSE

MIT