percy / percy-cypress

Visual testing with Cypress and Percy
https://percy.io
MIT License
340 stars 41 forks source link

TypeError: cy.percySnapshot is not a function #238

Closed Deekor closed 3 years ago

Deekor commented 4 years ago

Followed instructions here: https://docs.percy.io/docs/cypress

for an angular app and am getting this error: TypeError: cy.percySnapshot is not a function

I tried updating our e2e/ts.config file:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "types": [
      "cypress",
      "node",
      "@percy/cypress"
    ]
  },
  "include": [
    "**/*.ts"
  ]
}

But it didn't fix the issue

Robdel12 commented 4 years ago

Hey @Deekor! That error usually means step 1 in the docs were missed:

// At the top of cypress/support/commands.js
import '@percy/cypress';

If that's there, would you be able to share more details about how you integrated the SDK? Details about your Cypress setup would also be helpful