-
Notifications
You must be signed in to change notification settings - Fork 610
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
[TEST] Automatic screenshots comparing and error checking in IE11, Firefox and Chrome #715
Conversation
await once(server, 'listening'); | ||
return server; | ||
} | ||
module.exports = launchServer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to utilise server.js
? It seems to be doing the same thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's possible, it just looks a little bit overblown (with WebPack middlewares and test endpoint) for me for the task. I will submit an update later.
@jshjohnson this is done. Test in IE11 is failing, because the actual page is failing - see #732 and #733. You can merge this first to see which PR will finally fix IE11 😄 |
Thanks for this! 🎉 |
Visual regressions (like #702 ) are very hard to track without automatic tools in place.
This PR adds one small GitHub Action that automatically loads demo page from local sources, opens one instance of Choices, makes screenshots in Internet Explorer 11, Firefox (on Windows and MacOs, as they are different) and Chrome (via Puppeteer) and compares them against base snapshots using pixelmatch.
If a something is not matching snapshot then a contributor will be able to download current screenshot as well as diff.
So, every PR that makes a visible changes will had to come with new snapshots making it very easy for visual review too.
On Chrome we also verifying that whole demo page is loading without errors nor
console.error
output.No dependencies are adding to the project itself, all required dependencies are installing on demand at GitHub Actions (I think we should do the same with
bundlesizes
too).🎉
@jshjohnson purposely didn't fixup all commits to show that it was easy 😄
PS: Had to add
.gitattributes
to be able to build on WindowsPS1: Unfortunately, Safari on GitHub Actions is not configured for remote automation, so, had to left that for future improvements.