diff --git a/cypress.config.js b/cypress.config.js index eeab96e6ba9..deb98a2d848 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -1,5 +1,6 @@ -const cypress = require("cypress"); -module.exports = { +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ e2e: { specPattern: 'cypress/tests/data/**', experimentalSessionAndOrigin: true, @@ -18,7 +19,12 @@ module.exports = { }, "defaultGenre": "Article Text" }, - "pluginsFile": "lib/pkp/cypress/plugins/index.js", + setupNodeEvents(on, config) { + on('', (arg1, arg2) => { + "pluginsFile": "lib/pkp/cypress/plugins/index.js", + }) + }, + "watchForFileChanges": false, "defaultCommandTimeout": 10000, "video": false,