GithubHelp home page GithubHelp logo

shauvik / cypress-example-piechopper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cypress-io/cypress-example-piechopper

0.0 2.0 0.0 2.76 MB

An example angular application with tests written in Cypress.

License: MIT License

CoffeeScript 28.44% HTML 25.75% CSS 4.45% JavaScript 37.96% Shell 3.42%

cypress-example-piechopper's Introduction

Sample to demonstrate cypress stubbing flakiness

To run, just clone this repo and run cypress run. It's flaky; So, you might need to run more than once.

Eventually one of the "Sharing Results" tests fails and generates a screenshot in cypress/screenshot.

Error Message:

CypressError: Timed out retrying: cy.wait() timed out waiting 5000ms for the 1st request to the route: 'proposal'. No request ever occured.

Insights:

I built the example app using grunt and added the build dir to git.

  • The app that the tests run against is inside build/served.
  • I changed the index.html of the generated code to add a function that injects our recording script which is called from beforeEach() of the test. This part seems to work well.
  • Since everything is stubbed, we don't need to run the server for this test.
  • The tests in "Sharing Results" are what flake due to a timeout, although the request is sent. Screenshots are also on git here but as you pointed out, they don't all the info due to the preceding tests occupying the screen.

# PieChopper [![Travis CI](https://travis-ci.org/cypress-io/cypress-example-piechopper.svg?branch=master)](https://travis-ci.org/cypress-io/cypress-example-piechopper) [![Circle CI](https://circleci.com/gh/cypress-io/cypress-example-piechopper.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-example-piechopper)

piechopper-gif

Installing

## install the node_modules
npm install

Development

## build the app files (once)
npm run build

## start the local webserver
npm start

## if you modify the app source files and
## want the files to auto build (optional)
npm run watch

navigate your browser to

http://localhost:8080

Running Tests in Cypress

cypress-example-piechopper's People

Contributors

brian-mann avatar jennifer-shehane avatar jojanaho avatar shauvik avatar

Watchers

 avatar  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.