This Plugin leverages OpenAI to help give tips to debugging cypress tests when they fail.
npm install @djgould/cypress-ai --save-dev
cypress.config.ts
import { defineConfig } from 'cypress'
import { cypressAI } from '@djgould/cypress-ai'
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
cypressAI(on, config, { apiKey: 'open ai api key' })
}
}
})
Include failed html in request to open ai
- Configure Cyclope to save page after failure here
- Add
includeFailedHtml: true
to options:
cypressAI(on, config, { apiKey: 'open ai api key', includeFailedHtml: true })
- Create an project issue with proper description and expected behaviour
- NPM command
npm run verify
have to pass locally - Provide a PR with implementation and tests