$ git clone https://github.com/webmasterdevlin/redux-toolkit-course.git
$ cd redux-toolkit-course
$ npm install
$ npm run start:fullstack
The React app, and the fake web service will run concurrently.
https://kentcdodds.com/blog/common-mistakes-with-react-testing-library
- always use eslint-plugin-testing-library and eslint-plugin-jest-dom
- always use screen
- use screen.getByRole instead of screen.getByTestId
- use screen.queryByRole only when expecting not.toBeInTheDocument
- use await screen.find* instead of await waitFor/wait
- if necessary, use await waitFor instead of await wait
- use userEvent instead of fireEvent
- don't use userEvent inside the callback of waitFor
https://docs.cypress.io/guides/references/best-practices.html
- The application is using test ID instead of role when querying dom elements
- Test IDs are simple and isolated