From 502a690dfcd9912a9625d344632d1f3d2fe2e64e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 Jan 2025 10:55:29 +0100 Subject: [PATCH] Bug 38503: Merge the module.exports We redefine it and so the query/mysql plugin is not available It fixes csrf.ts 14:36:17 koha_1 | The task 'query' was not handled in the setupNodeEvents method. The following tasks are registered: buildSampleObject, buildSampleObjects --- cypress.config.ts | 2 +- t/cypress/plugins/index.js | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/cypress.config.ts b/cypress.config.ts index e90da4e019d..94f13d6bd47 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -12,7 +12,7 @@ export default defineConfig({ return require("./t/cypress/plugins/index.js")(on, config); }, experimentalStudio: true, - baseUrl: "http://localhost:8081", + baseUrl: "http://kohadev-intra.mydnsname.org:8081", specPattern: "t/cypress/integration/**/*.*", supportFile: "t/cypress/support/e2e.js", env: { diff --git a/t/cypress/plugins/index.js b/t/cypress/plugins/index.js index 6f14a7f4f9e..76e6a4c249c 100644 --- a/t/cypress/plugins/index.js +++ b/t/cypress/plugins/index.js @@ -1,5 +1,9 @@ const { startDevServer } = require('@cypress/webpack-dev-server') +const mysql = require("cypress-mysql"); + +const { buildSampleObject, buildSampleObjects } = require("./mockData.js"); + module.exports = (on, config) => { on('dev-server:start', options => startDevServer({ @@ -7,18 +11,8 @@ module.exports = (on, config) => { }) ) - return config; -}; - -const mysql = require("cypress-mysql"); - -module.exports = (on, config) => { mysql.configurePlugin(on); -}; -const { buildSampleObject, buildSampleObjects } = require("./mockData.js"); - -module.exports = (on, config) => { on("task", { buildSampleObject, buildSampleObjects, -- 2.34.1