question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make running Percy integration optional

See original GitHub issue

I would like to have cy.percySnapshot() in my tests so that I get visual diffing while running on my CI. But when our developers run tests locally, I do not want to do visual diffing (so that they do not need to setup Percy tokens and stuff like that). It seems that currently cy.percySnapshot() fails if Percy is not running.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
CyrilKrylatovcommented, Dec 2, 2021

Hello @djones!

Sorry to reopen this one after such a long time but it seems like my tests running via ./node_modules/.bin/cypress run (so, without the percy command as I don’t want Percy to be involved here, I need Cypress to run without Percy), my test is failing.

        "@percy/cli": "^1.0.0-beta.70",
        "@percy/cypress": "^3.1.1",

my become-seller.spec.js:

describe('Test the Become Seller page', () => {
  it('Goes on the registration page', () => {
    /**
     * @param {Object} routes.statics
     * @param {string} routes.statics.becomeSeller
     */
    cy.fixture('routes').then((routes) => {
      cy.visit(routes.statics.becomeSeller)
    })
    cy.window()
      .scrollTo('bottom', { duration: 50 })
    cy.percySnapshot()
  })
})

If I remove the cy.percySnapshot() it works well.

You can find the whole output here: https://gist.github.com/CyrilKrylatov/fff45dc898f77d4bc57103fe89edb2ef

Do you have any input on why the test is failing?

Thank you for your time. ✌️

Edit: oh, it’s related to #434.

0reactions
mitarcommented, Nov 8, 2018

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration - Percy Docs
Percy SDKs can be configured in many different ways. To quickly get started, run percy config:create in your project's root directory (or wherever...
Read more >
A Guide to Visual Testing with Percy - SitePoint
Michael Wanyoike shows how to set up and run visual testing for your project with Percy, using an API-driven SPA using real-world data....
Read more >
Learn to Integrate Visual Testing with Percy - YouTube
Did you know that you can set up a review system so that every pull request you make shows you exactly what has...
Read more >
Percy helps make sure the visual changes you ... - YouTube
I wanted to make sure you understand exactly what Percy can do for you, hence the title. When you commit a change to...
Read more >
How to migrate your Visual Testing Project to Percy CLI
Percy is typically integrated with popular test automation tools such as Cypress, Puppeteer, Playwright, etc., to yield the best possible ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found