From 88ba0d535ee46c9a51cb2f98220476a03619ef67 Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:15:53 +0530 Subject: [PATCH] fix: reports --- cypress-tests/cypress.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cypress-tests/cypress.config.js b/cypress-tests/cypress.config.js index 56f6887761a7..a501f7b3e808 100644 --- a/cypress-tests/cypress.config.js +++ b/cypress-tests/cypress.config.js @@ -1,5 +1,5 @@ import { defineConfig } from "cypress"; -import "cypress-mochawesome-reporter/plugin.js"; +import mochawesome from "cypress-mochawesome-reporter/plugin.js"; let globalState; @@ -10,7 +10,9 @@ const reportName = process.env.REPORT_NAME || `${connectorId}_report`; export default defineConfig({ e2e: { - setupNodeEvents(on) { + setupNodeEvents(on, config) { + mochawesome(on); + on("task", { setGlobalState: (val) => { return (globalState = val || {}); @@ -26,6 +28,8 @@ export default defineConfig({ return null; }, }); + + return config; }, experimentalRunAllSpecs: true, @@ -43,6 +47,5 @@ export default defineConfig({ chromeWebSecurity: false, defaultCommandTimeout: 10000, pageLoadTimeout: 20000, - screenshotsFolder: screenshotsFolderName, });