Skip to content

screen-diff-plugin: support multiple screen diffs per test via custom attachment view#1145

Merged
baev merged 1 commit into
allure-framework:masterfrom
just-boris:master
Nov 27, 2020
Merged

screen-diff-plugin: support multiple screen diffs per test via custom attachment view#1145
baev merged 1 commit into
allure-framework:masterfrom
just-boris:master

Conversation

@just-boris
Copy link
Copy Markdown
Contributor

@just-boris just-boris commented Oct 18, 2020

Context

closes #613

Allow multiple screenshot differences via attachments. It should have the following format

{
  "expected": "data:image/png;base64,....",
  "actual": "data:image/png;base64,....",
  "diff": "data:image/png;base64,...."
}

To support this, I extended plugin API allowing to register custom attachment views per mime type

allure.api.addAttachmentViewer(mimeType, {
  View: CustomView,
  icon: 'fa  fa-exchange', // custom icon if you want
});

Checklist

  • Sign Allure CLA
  • Provide unit tests – where are all frontend tests? Can't find any

Comment thread allure-generator/build.gradle.kts Outdated
Comment thread plugins/screen-diff-plugin/src/dist/static/index.js Outdated
@just-boris
Copy link
Copy Markdown
Contributor Author

Jenkins does not seem to publish demo report in the build artifacts. Uploaded the demo here: https://epic-villani-f00688.netlify.app

@baev
Copy link
Copy Markdown
Member

baev commented Oct 22, 2020

LGTM

@just-boris
Copy link
Copy Markdown
Contributor Author

Status update: got this working locally with allure-mocha. Some more changes are required. Will try to do them as soon as I can.

@just-boris just-boris marked this pull request as ready for review November 17, 2020 21:36
@baev baev merged commit 63695d9 into allure-framework:master Nov 27, 2020
@baev
Copy link
Copy Markdown
Member

baev commented Nov 27, 2020

@just-boris 👏 👏 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Screen-diff plugin should allow per-steps screenshots comparison

2 participants