-
Notifications
You must be signed in to change notification settings - Fork 203
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
feat: allow folders on snapshot identifier #267
Conversation
Hi guys, I'm having some doubts regarding the checklist item "My change requires a change to the documentation and I have updated the documentation accordingly.". How should I add this to the documentation? |
In regards to updating the readme, I would add that the This feature is currently available through the |
The |
# [4.5.0](v4.4.1...v4.5.0) (2021-04-29) ### Features * allow folders on snapshot identifier ([#267](#267)) ([ad49a97](ad49a97))
🎉 This PR is included in version 4.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* feat: allow folders on snapshot identifier * docs(readme): added path support to identifier option Co-authored-by: Jonny Adshead <JAdshead@users.noreply.github.com>
# [4.5.0](americanexpress/jest-image-snapshot@v4.4.1...v4.5.0) (2021-04-29) ### Features * allow folders on snapshot identifier ([americanexpress#267](americanexpress#267)) ([ad49a97](americanexpress@ad49a97))
Allow users to add paths to the Snapshot Identifier option.
Description
Improved creation of folders (via
mkdirp
) to use thepath.dirname
of the screenshot, instead of only using the screenshots/diff folders.Motivation and Context
Allow better organization of screenshots, allowing to use folders.
This allows to improve the snapshot organization when using visual tests for different pages, making use of the
customSnapshotIdentifier
option to dynamically organize the snapshots according to the test set they belong to.How Has This Been Tested?
Unit tests added;
Tested on another application by using the following:
A name like "Home Screen 1280 x 720 Full Page Render" is converted to "Home/1280 x 720/Full Page Render" where screenshots are organized by page, screen size and test name.
Types of Changes
Checklist:
What is the Impact to Developers Using Jest-Image-Snapshot?
Allowing better organization of snapshots.