cypress-io / cypress-example-kitchensink

This is an example app used to showcase Cypress.io testing.

Home Page:https://example.cypress.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad link to https://placehold.it/100x100 causes cypress tests to hang or run very slowly

carylewis opened this issue · comments

I wanted to run the kitchen sink tests on the example.cypress.io website rather than run the site locally. After updating the tests to reference the example.cypress.io domain rather than localhost:8080, I discovered that each cypress test in the 2-advanced-examples/actions.spec.js file were either failing or taking a very long time to run.

The root cause of this delay is a reference to https://placehold.it/100x100 in the app/commands/actions.html file, which redirects to https://www.placeholder.com/100x100, which then redirects to https://placeholder.com/100x100.

That URL is broken and returns a 500 error, but it can take up to 60 seconds for that to happen, which causes the cypress tests to run either very slowly (as the beforeEach() loads the https://example.cypress.io/commands/actions page before each cy.visit).

I thought I would post this in case anyone else encountered this.

Note: This problem exists even if you're running the site locally.

Workaround

To work around this, you can replace the references to https://placehold.it/100x100 in the app/commands/actions.html file with https://via.placeholder.com/100x100

Thanks for the report! We've fixed this in the latest release, 1.15.3, by removing the placeholder images entirely and just using styled divs (see #540).

When will that release be available?

It's available on github (in the master branch) and on NPM right now. Still working through some issues with the deployment; hopefully it'll be on example.cypress.io in the next couple hours, as soon as I work out the remaining hurdles.