allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

[Cypress] - when combining multiple reporters, screenshots aren't available to other reporters

Open harmin-parra opened this issue 5 months ago • 0 comments

Describe the bug I am using Allure and cypress-mochawesome-reporter.

Screenshots are available in Allure report but not in the mochawesome report.

To Reproduce the support/e2e.js file:

import './commands'
import 'cypress-mochawesome-reporter/register';
import "allure-cypress";

// Alternatively you can use CommonJS syntax:
// require('./commands')

The reporter.js file:

const { CucumberJSAllureFormatter, AllureRuntime } = require("allure-cucumberjs");

function Reporter(options) {
  return new CucumberJSAllureFormatter(
    options,
    new AllureRuntime({ resultsDir: "../reporting/allure-results/nodejs" }),
    {}
  );
}
Reporter.prototype = Object.create(CucumberJSAllureFormatter.prototype);
Reporter.prototype.constructor = Reporter;

exports.default = Reporter;

Screenshots The Allure report: image

The mochawesome report: image

Expected behavior Screenshots are also available in the mochawesome report

Additional context NPM modules:

[email protected]
[email protected]
[email protected]

harmin-parra avatar Sep 21 '24 11:09 harmin-parra