Video Presentation from UCTech 2022
This repo is meant to demonstrate how to write different types of Cypress tests by testing the TodoMVC app.
Each testing lesson can be checked out as its own branch. So start in the
test1
branch and work from there.
test1
Setup - "Writing your first test"test2
Interacting with the Site - "Adding a task"test3
Writing Assertions - "Complete tasks"test4
Faking Data - "Intercept API request and replace with a fixture"test5
Stubbing Functions - "Stub the confirm() function"test6
Mobile and Desktop Resizing - "Viewport resizing"test7
Custom Commands - "Use a custom command to add a task"test8
Ensuring Accessibility - "Accessibility testing with Axe"test9
Automating with Continuous Integration - "Github Actions"
Node.js is required. If using
NVM you can run $ nvm use
to automatically
switch to the correct version of Node.
- Install all Node packages including Cypress.
$ npm ci
- Start the server so that the site can be viewed at: http://127.0.0.1:8080
$ npm start
- Open the Cypress GUI with another terminal window.
$ npm run cypress
TodoMVC • Vanilla ES6
A port of the Vanilla JS Example, but translated into ES6, also known as ES2015.
Created by Luke Edwards Refactored by Aaron Muir Hamilton