percy-cypress: Percy not capturing any snapshots (fails to find healthcheck)
Hi
I’m trying to integrate Percy and Cypress for one of my projects. Sadly Percy doesn’t seem to take any snapshots even though I’m calling cy.percySnapshot multiple times.
This is my current test:
describe('Magento tests', () => {
beforeEach(() => {
cy.visit(Cypress.env('staging-url'))
})
it('Should allow a product to be ordered', () => {
cy.percySnapshot('Homepage')
// Forcing due to sticky headers messing up the click area
cy.get('nav.navigation > ul > li:first-of-type a')
.click({ force: true })
cy.percySnapshot('Category - Boxsprings')
cy.get('.products.list.items.product-items')
.find('li:first-of-type a.product-item-link')
.click()
cy.percySnapshot('Product page')
})
})
This is my Cypress result:
UPDATE: Seems like percy is unable to capture screenshots on https websites. Is this correct? This is quite a showstopper for the current project I’m integrating it for.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 41 (16 by maintainers)
thanks @Robdel12 ! that did the trick i see snapshots being taken and uploaded now after updating to 0.8.3
Seems to work now. Just deleted node_modules and reinstalled everything. Thanks!
I’m seeing an issue with Percy not taking screenshots within my Cypress project. I’ve tried to point the tests to both a https and non https site and each time the tests pass in Cypress but fail within the Percy Dash as it was unable to find any screenshots.
When I run via chrome (and the cy GUI opens locally) I can see that the percy agent healthcheck is failing for some reason…
Any advice?
I am running my test using a script, as such:
“cy:run:percy”: “export TEST_SUITE=foo; PERCY_TOKEN=xxx PERCY_BRANCH=test percy exec – cypress run”,
I can see it running in the terminal, bookended by percy calls
[percy] percy has started / ended etc…
Thank you so much @Robdel12, much appreciated . Issue is resolved with 9.1.1
@Robdel12 I cannot add that flag?
I tried before exec command as well
Hey @Uraz04, it looks like you’re running on a network with a self signed cert (this won’t work with Percy)
I believe this is safe to close now. If anyone sees any more issues with the healthcheck failing please comment and we’ll reopen 👍
1.0.4 works for me. Looks like the healthcheck path fix did the trick!
Hey all! We had an issue with the 1.0.3 release but it should be fixed with 1.0.4. Can you give it a try and let us know? https://github.com/percy/percy-cypress/releases/tag/v1.0.4
Hi @GordonTester, I had the same issue and downgrading to version 1.0.2 fixed it for me.
Hi there!
Percy can capture HTTPS websites. This seems a lot like there’s CSP or CORS issues on the page blocking us from POSTing the DOM back to our node process. Can you try disabling Cypress web security and give it another shot?