Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/plugin/allure.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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;
});

Expand Down