export default IndexPage
Commit those changes to a new branch and watch Netlify spin up a deploy preview, complete its various checks, and trigger Percy. Percy will render new screenshots for your compiled site and compare them against the snapshots from our first build.
Since there are visual changes, Percy will show up in your pull request as needing review:
Clicking “Details” will take you to the Percy UI where you can review the visual change:
The red highlighting in the right panel represents the part of your page that has changed. Clicking that area (or pressing “d”) will toggle between the diff and the underlying screenshot so you can easily see what has changed.
Your pages have been rendered across different responsive widths and browsers to help detect regressions across those different environments.
By default, Percy renders across Chrome and Firefox, both at 375px and 1280px. To configure custom widths, check out our global @percy/agent config docs.
With Percy, you can either Approve ✅ or Request changes 🙅♀️as well as leave comments 💬 on snapshots.
If you’re happy with your changes, you can approve individual snapshots or “Approve all” to signify that everything looks good. Alternatively, if the detected changes were unintentional or otherwise are not ready to be merged, marking them as “Changes requested” will block the build from being approved. This feature, coupled with snapshot comments, makes it easy for teams to collaborate and stay on the same page throughout visual reviews.
Since we meant to make this change, let’s hit “Approve.” Heading back over to our pull request, we’ll see that all our pull request check is green:
Congratulations on doing your first visual review! ✨
We hope this tutorial helped you get started with Percy for Gatsby and Netlify and gave you a glimpse into the powers fo visual testing.
We’re thrilled to make it easier to integrate Percy with Gatsby and to provide first-class support for Netlify. If you have questions or need help, don’t hesitate to reach out to support via our website chat or by emailing support@percy.io.
Tutorial: Visual testing for Gatsby and Netlify with Percy was originally published in Percy Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.