Using React Developer Tools with Cypress
In the previous section, we learned how to write tests using Cucumber. In this section, we will learn how to install React Developer Tools for development. React Developer Tools is a great tool to have while developing React applications. It enables you to inspect the hierarchy of components rendered in the DOM and do things such as viewing and editing component props and state. There are Chrome and Firefox extensions available to install React Developer Tools. There is also a standalone Electron app version, which is useful, such as when you want to debug React applications in Safari or mobile browsers. We will also learn how to use the standalone version with Cypress.
Use the following command to install via the command line:
npm install --save-dev react-devtools
The preceding command will install react-devtools
as a development dependency in your project. Next, we need to add a script that will connect react-devtools
to your application...