✨ Disable Percy when Cypress is in interactive mode #321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Percy is designed (at this time) to run in CI, with one complete test run to each build. Running Percy when doing TDD style tests (or anything watching changes like
cypress open
) will result in duplicate snapshot errors/unexpected results.On top of that, a recent bug in the Cypress networking layer (likely cypress-io/cypress#15101) causes any tests that call
cy.percySnapshot
to hang/break (since we make a network request, which eventually causes that callstack error in Cypress).Approach
Since Percy's workflow is already misaligned with using
cypress open
, we're going to disable Percy from running / making network calls in Cypress Interactive mode. This could result in empty builds, which will eventually be handled upstream in@percy/core
when we implement a lazy snapshot queue.Will close #315