/React-Vite-Cypress

React+Vite+Cypress boilerplate

Primary LanguageTypeScript

React-Vite-Cypress Boilerplate

Cypress is a powerful end-to-end testing framework designed to make testing web applications faster and easier.

Technologies Used:

Project Setup:

Clone the Repo:

git clone https://github.com/Rutvi25/React-Vite-Cypress

Install Dependencies

npm install

Start the Development Server

npm run dev

Writing the Test Cases:

  • Navigate to the /cypress directory.

  • Write Component Level Test Cases

    • Move to the cypress/component/ directory
    • Create a new test file with the .ts extension, and write the test cases according to requirements.
  • Write End-to-End Test Cases

    • Move to the cypress/e2e/ directory
    • Create a new test file with the .ts extension, and write the test cases according to requirements.

Checkout the basic Todos Application for reference

Running the Test Cases:

Launch the cypress to run test suite

npm run cypress

Select the test type

Screenshot from 2023-12-21 14-32-00

Select the browser

image

Interact with test runner

Write & run tests, inspect DOM and use the Debugger

image

Demo

BoilerPlate.Demo.mp4