We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
12.3.0
Hi there, thanks for creating this plugin!
As per https://docs.cypress.io/guides/tooling/plugins-guide#Using-a-plugin the cypress/plugins/index.js is deprecated after v10, is there an example on how to import this in a later version?
cypress/plugins/index.js
Thanks in advance!
The text was updated successfully, but these errors were encountered:
We're using Cypress 12.4.0, here is an example cypress.config.ts file:
cypress.config.ts
import fs from 'fs' import pactCypressPlugin from '@pactflow/pact-cypress-adapter/dist/plugin' const { defineConfig } = require('cypress') export default defineConfig({ morgan: false, chromeWebSecurity: false, defaultCommandTimeout: 10000, viewportWidth: 1280, viewportHeight: 720, downloadsFolder: './downloads', fixturesFolder: './fixtures', screenshotsFolder: './screenshots', videosFolder: './videos', e2e: { specPattern: './e2e/**/*.cy.{js,jsx,ts,tsx}', supportFile: './support/e2e.{js,jsx,ts,tsx}', screenshotOnRunFailure: false, experimentalRunAllSpecs: true, video: false, setupNodeEvents (on, config) { pactCypressPlugin(on, config, fs) return config }, }, })
In our /support/index.ts file we have:
import '@pactflow/pact-cypress-adapter' before(() => { cy.setupPact('frontend-e2e', 'api') cy.intercept('{BACKEND-API-URL-HERE}**').as('api') }) after(() => { cy.usePactWait(['api']) })
Seems to work for us. Good luck!
Sorry, something went wrong.
nice @tomardern
we have an open pr to add a cypress 10 example here
#31
No branches or pull requests
Hi there,
thanks for creating this plugin!
As per https://docs.cypress.io/guides/tooling/plugins-guide#Using-a-plugin the
cypress/plugins/index.js
is deprecated after v10, is there an example on how to import this in a later version?Thanks in advance!
The text was updated successfully, but these errors were encountered: