From d2a59af3e68514193efd22c862fecc41734ca065 Mon Sep 17 00:00:00 2001 From: marcam-sl <112952777+marcam-sl@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:12:07 +0300 Subject: [PATCH] Fix for multi-reporter config with SL --- tests/e2e/configs/reporters.config.js | 8 +------- tests/e2e/constants/REPORTER_CONSTANTS.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/e2e/configs/reporters.config.js b/tests/e2e/configs/reporters.config.js index f65d09cc1f0..61c8218e124 100644 --- a/tests/e2e/configs/reporters.config.js +++ b/tests/e2e/configs/reporters.config.js @@ -12,16 +12,10 @@ const { BASE_TEST_CONSTANTS } = require('../constants/BASE_TEST_CONSTANTS'); module.exports = { reporterEnabled: REPORTER_CONSTANTS.REPORTERS_ENABLED(), + seaLightsReporterReporterOptions: {}, allureMochaReporterOptions: { resultsDir: '.allure-results' }, - - "SeaLightsReporterReporterOptions": {}, - "mochaAllureReporterOptions": { - "targetDir": ".allure-results" - }, - "mochaJunitReporterReporterOptions": {}, - reportportalAgentJsMochaReporterOptions: { apiKey: REPORTER_CONSTANTS.RP_API_KEY, endpoint: REPORTER_CONSTANTS.RP_ENDPOINT(), diff --git a/tests/e2e/constants/REPORTER_CONSTANTS.ts b/tests/e2e/constants/REPORTER_CONSTANTS.ts index 5ac664f9317..51507ea6e88 100644 --- a/tests/e2e/constants/REPORTER_CONSTANTS.ts +++ b/tests/e2e/constants/REPORTER_CONSTANTS.ts @@ -78,10 +78,14 @@ export const REPORTER_CONSTANTS: { SAVE_RP_REPORT_DATA: process.env.SAVE_RP_REPORT_DATA === 'true', /** - * list of enabler reporters + * list of enabled reporters */ REPORTERS_ENABLED: (): string => { - let reporters: string = 'dist/utils/CheReporter.js'; + let reporters: string = ''; + + reporters += 'slnodejs/tsOutputs/mocha-reporter/index'; + reporters += ',dist/utils/CheReporter.js'; + if (REPORTER_CONSTANTS.SAVE_ALLURE_REPORT_DATA) { reporters += ',allure-mocha'; } @@ -89,8 +93,6 @@ export const REPORTER_CONSTANTS: { reporters += ',@reportportal/agent-js-mocha'; } - reporters += ',slnodejs/tsOutputs/mocha-reporter/index'; - return reporters; },