Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 27, 2020

Conversation

just-boris
Copy link
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

@just-boris
Copy link
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
Member

baev commented Oct 22, 2020

LGTM

@just-boris
Copy link
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.

@baev baev merged commit 63695d9 into allure-framework:master Nov 27, 2020
@baev
Copy link
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