Initial Configuration | Bondar Academy
Course: Cypress UI Testing with JavaScript
Module: Cypress Hands-On Overview
Instructor: Artem Bondar
Lesson Summary
In this lesson, we will configure the Cypress framework by modifying its configuration file. Here are the key points covered: Cypress Configuration Overview The configuration options in Cypress are divided into two main categories: Generic Framework Options Test Specific Options End-to-End Testing Component Testing Configuration File Structure In the configuration file: Global configurations are placed outside the e2e object. End-to-end test specific configurations are placed within the e2e object. Common Configuration Options Some important configuration options include: Default Command Timeout: This sets the time Cypress waits for a command to complete. Default is 4000 milliseconds. Adjust this if your application loads slowly. Viewport: The default viewport size is 1000 pixels. This can be updated to a more suitable resolution, such as 1280 pixels. Base URL: This is essential for specifying the test application URL, which should be placed under the e2e object. Validating Configuration Changes To validate the configuration: npx cypress open After running Cypress, check the project settings to ensure that the custom configurations are applied correctly. Look for: Custom configurations highlighted in a different color. Verification of overridden values like the viewport size. Ensure that the syntax in the configuration file is correct to avoid errors. This process allows you to tailor Cypress settings to fit your testing needs effectively.