Additional configurations
Let us review a few additional configurations in this section to build stable and efficient specs:
- The first configuration is a Git feature and not specific to Cypress. Adding a .gitignore file is a general necessity for all projects. Add it to the src/ch5/app root folder to ignore files we don’t want Git to track on our local directory. As shown in Figure 5.23, let’s add a node_modules folder so that we don’t have to check in and keep track of all dependencies:
Figure 5.23 – .gitignore file
- Cypress comes with a default timeout of 4 seconds (4,000 milliseconds), and the get method accepts a second parameter to set a custom timeout. For example, in our spec, we can add extra wait after searching for the string and waiting for the Reset button to appear with cy.get('.reset-button', {timeout:10000}).should("be.disabled"). This line waits for 10 seconds for the Reset...