Images are stored in the Git repo like any other file. This makes is simple to share baseline images across the teams. It also allows for changes in the baseline to be tracked over time.
Whether or not updates to the baseline images are accepted depends on the goal of the changes. Here are a few scenarios:
If no visual changes occur (and none were expected), then nothing needs to be checked in.
If visual changes occured (new images in the diff directory), but they weren't intended, that means there was a regression in the UI output. Review the diffs and fix the visual changes that occurred. No files should be checked in.
If visual changes occur and are warranted, the following steps will need to be taken to update the baseline images:
- Delete the contents of the baseline & diff image directories.
- Run the test suite again.
- Add/commit all updated images.
- Submit a Pull Request to the GitHub repo with both the updated functionality and the new images.
- Have another team member review the new images. Github has useful image diff tools to help compare the changes.