Skip to content

Comments

Compare actual/expected screenshots in acceptance tests#124

Closed
mattwynne wants to merge 1 commit intomainfrom
test-with-screenshots
Closed

Compare actual/expected screenshots in acceptance tests#124
mattwynne wants to merge 1 commit intomainfrom
test-with-screenshots

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
@davidjgoss
Copy link
Contributor

Picking this up in #382

@davidjgoss davidjgoss closed this Jun 23, 2025
@luke-hill luke-hill deleted the test-with-screenshots branch October 3, 2025 16:48
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.

2 participants