Follow these instructions to install Cypress.
Fork this project.
After forking this project in Github
, run these commands:
## clone this repo locally
git clone https://github.com/<your-username>/e2e-interview-test.git
## cd into the cloned repo
cd e2e-interview-test
## install dependencies
npm install
## start the local webserver
npm start
The npm start
script will spawn a webserver on port 8888
which hosts the TodoMVC app.
You can verify this by opening your browser and navigating to: http://localhost:8888
You should see the TodoMVC app up and running and you can play around with it to get a sense of what it does. Now we're ready to add to our test suite.
We already have some tests written for this application. We need you to add the
following tests to cypress/integration/app_spec.js
Look in that file for // TODO:
comments and add tests in those places.
You can run the tests in headless mode to quickly check they are passing:
npm run test
It can be useful to open cypress in dev mode in order to see what your tests are doing.
(Note: be sure to quit out of the npm start
above if you still have it running)
npm run dev
See also package.json
for other ways to run the tests.
This project also adds several custom commands in cypress/support/commands.js. They are useful to create one or more default todos from the tests.
it('should append new items to the bottom of the list', function () {
cy.createDefaultTodos().as('todos')
// more test commands
})