Closed BorisovskiP closed 2 years ago
I think the proper solution is to replace the cypress.json
with a file cypress.config.js
:
const {defineConfig} = require('cypress');
module.exports = defineConfig({
e2e: {
baseUrl: "http://example.com/",
watchForFileChanges: false,
viewportWidth: 1920,
viewportHeight: 1080,
env: {
mobileViewportWidthBreakpoint: 768,
mobileViewportWidthBreakpointHyva: 1024
},
supportFile: false,
specPattern: 'cypress/integration/hyva/**/*.spec.js'
}
});
This seems to work in CI:
- echo "const { defineConfig } = require('cypress'); module.exports = defineConfig({e2e:{ ...$(cat cypress.json), supportFile:false, specPattern:'cypress/integration/hyva/**/*.spec.js' }});" > cypress.config.js
- rm cypress.json
Reference https://docs.cypress.io/guides/references/migration-guide#Configuration-File-Changes
Describe the bug Using
"cypress": "^10.0"
will throw the following error:Cypress version 10.0.0 no longer supports cypress.json.
To Reproduce Steps to reproduce the behaviour:
"cypress": "^10.0"
npx cypress run --spec ./cypress/integration/path/to/some.spec.js
Expected behaviour Using the current version of cypress should work with the module
Additional context A current workaround to this is to have a dependency on
"cypress": "^9.7.0