diff --git a/lib/plugin/allure.js b/lib/plugin/allure.js index 444a6a1d5..1a2e2980f 100644 --- a/lib/plugin/allure.js +++ b/lib/plugin/allure.js @@ -45,6 +45,9 @@ const defaultConfig = { * ##### Configuration * * * `outputDir` - a directory where allure reports should be stored. Standard output directory is set by default. + * * `enableScreenshotDiffPlugin` - a boolean flag for add screenshot diff to report. + * To attach, tou need to attach three files to the report - "diff.png", "actual.png", "expected.png". + * See [Allure Screenshot Plugin](https://github.com/allure-framework/allure2/blob/master/plugins/screen-diff-plugin/README.md) * * #### Public API * @@ -110,6 +113,10 @@ module.exports = (config) => { event.dispatcher.on(event.test.before, (test) => { reporter.startCase(test.title); + if (config.enableScreenshotDiffPlugin) { + const currentTest = reporter.getCurrentTest(); + currentTest.addLabel('testType', 'screenshotDiff'); + } currentStep = null; });