Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparkbox/code-challenge-cypress
A TDD code challenge with Cypress
https://github.com/sparkbox/code-challenge-cypress
Last synced: about 2 months ago
JSON representation
A TDD code challenge with Cypress
- Host: GitHub
- URL: https://github.com/sparkbox/code-challenge-cypress
- Owner: sparkbox
- Created: 2022-07-21T04:40:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T04:40:58.000Z (over 2 years ago)
- Last Synced: 2024-04-11T03:37:33.111Z (9 months ago)
- Language: HTML
- Size: 69.3 KB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cypress testing challenge
Today we'll use test driven development (TDD) to build and validate a signup form.
We'll use [Cypress](https://www.cypress.io/) to test the UI of our form, along with [Testing Library](https://testing-library.com/docs/) to help drive the building of an accessible experience through testing.
# Getting started
1. Clone this repo
1. Run `npm install`.
1. Run `npm start` to start the development server.
1. Run `npm test` in a separate terminal to open Cypress.
1. In the Cypress UI, run `signup.cy.js`.
1. You should see a failing test.
1. Open the test file: [./cypress/e2e/signup.cy.js](./cypress/e2e/signup.cy.js).
1. Open the html file: [./signup.html](./signup.html).
1. Work through each step of the first test, implementing the code necessary in `signup.html` to make each step pass.
1. Subsequent tests are marked pending with `xit`. Change this to `it` to enable the test.
1. Rinse and repeat until all tests are passing.
1. Bonus: Add additional password validation! Be sure to test drive it!