Automattic / vip-design-system

Design system components used throughout WordPress VIP
https://vip-design-system-components.netlify.app/
16 stars 3 forks source link

Setup user-event and change some fireEvent to userEvent in tests #371

Closed djalmaaraujo closed 6 months ago

djalmaaraujo commented 7 months ago

Description

React Testing Library UserEvent API seems to have a better API than fireEvent to deal with user events. @brookewp mentioned this during a call with us, and I believe we should change some tests to have a better coverage of user events.

Checklist

Steps to Test

  1. Pull down PR.
  2. npm run install.
  3. npm run test.
  4. Tests should pass.
netlify[bot] commented 7 months ago

Deploy Preview for vip-design-system-components ready!

Name Link
Latest commit 9470f80822bf3a928cb89c61823af537fe0ec2d6
Latest deploy log https://app.netlify.com/sites/vip-design-system-components/deploys/660d47db16f71100083ee644
Deploy Preview https://deploy-preview-371--vip-design-system-components.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

brookewp commented 6 months ago

Thank you for opening this to implement userEvent! 🎉 Are the CSS changes a result of auto-formatting based on some rules?

djalmaaraujo commented 6 months ago

Thank you for opening this to implement userEvent! 🎉 Are the CSS changes a result of auto-formatting based on some rules?

CSS changes were a minor thing I ended up fixing because the tests were warning me something annoying in the terminal.