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

Compare actual/expected screenshots in acceptance tests #124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mattwynne
Copy link
Member

@mattwynne mattwynne commented Jun 15, 2022

🤔 What's changed?

  • Modified acceptance tests to save a screenshot of every rendered example, and use pixelmatch to compare with an expected one.

⚡️ What's your motivation?

I think this package needs better tests so that we can confidently deal with edge-cases like #120.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

♻️ Anything particular you want feedback on?

We could also save off the rendered HTML - and compare that. I feel the diffs would be too hard to read and so not very useful. Might help for debugging though?

Or maybe it would be better to make specific assertions about the rendered DOM?

📋 Checklist:


This text was originally generated from a template, then edited by hand. You can modify the template here.

@mattwynne mattwynne changed the title Acceptance tests use screenshots Compare actual/expected screenshots in acceptance tests Jun 15, 2022
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.

None yet

1 participant