Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(react-testing-library): Introduce user-event #29638

Merged
merged 30 commits into from
Nov 12, 2021

Conversation

priscilawebdev
Copy link
Member

@priscilawebdev priscilawebdev commented Oct 28, 2021

  • Adds the new dependency @testing-library/user-event
  • Replaces usage of fireEvent.* with userEvent.* as it is recommended by the library author.

More details:
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library#not-using-testing-libraryuser-event

@priscilawebdev priscilawebdev changed the title ref(react-testing-library): Introduce user-events ref(react-testing-library): Introduce user-event Oct 28, 2021
@@ -7,7 +7,7 @@
"**/*.pyc": true,
"build": true,
"htmlcov": true,
"node_modules": true,
"node_modules": false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still working on it and will update this file as soon as I am done 😉


expect(container).toSnapshot();
});
});

it('can toggle collapsed state', async function () {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for some reason, the order the test was running in was causing an error. I'm going to check this out and create a follow-up PR

@priscilawebdev priscilawebdev force-pushed the feat/introduce-rtl-user-event branch from 0ee1738 to 61c3635 Compare November 12, 2021 08:29
@priscilawebdev priscilawebdev changed the base branch from master to fix/project-filters-and-sampling-replace-queries-with-recommended-screen November 12, 2021 08:30
Base automatically changed from fix/project-filters-and-sampling-replace-queries-with-recommended-screen to master November 12, 2021 11:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants