Giter VIP home page Giter VIP logo

e2e-interview-test's Introduction

e2e Interview Test

Setup

1. Install Cypress

Follow these instructions to install Cypress.

2. Fork and Run Locally

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.

Testing the Todo app:

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.

Running Tests

Run the tests in headless mode

You can run the tests in headless mode to quickly check they are passing:

npm run test

Open cypress in dev mode

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.

Other Stuff

Custom commands

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
})

e2e-interview-test's People

Contributors

rob-ferguson avatar waldenraines avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.