From 558ed417061b59e5b91e3d9c02a9360c87efaa2a 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 --- t/cypress/plugins/index.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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