jest-image-snapshot
jest-image-snapshot copied to clipboard
Screenshot name for received image
While starting test (without screenshot) it generates screenshot with name like "suite_test_number", but failed screenshot generates with name "suite_test_number-received" How can I have same names for both files?
If you want to update the snapshots, you use the --update
flag.
If you want to update the snapshots, you use the
--update
flag.
But we can't use this flag on CI
Yes, you should not overwrite the snapshots in your CI.
Yes, you should not overwrite the snapshots in your CI.
So I need to have received(after fail) and generated screenshots with same name, how can I achieve this ? Bcoz as i see received ( generated after fail) screenshots has "-received" ending
If the received image has the same name it will overwrite the snapshot.
If the received image has the same name it will overwrite the snapshot.
Yes, but i can simply put received images in another folder and then in 1 click override old screenshots with new. In current situation I need to remove "-received" ending in all files.
Can you explain your use case? I don't understand what you are trying to do or why.
Can you explain your use case? I don't understand what you are trying to do or why.
- I have about 300 screenshot tests and all expected screenshots are stored in project.
- All of them are running as a part of CI/CD process for each commit
- If in one branch 150 of screenshots are failed developer need to go to received screenshots folder, rename all screenshots (remove -received ending), put in folder with expected screenshots and override existing.
I want to avoid "rename"step. Only pick received screenshots and put them in expected screenshots folder and push it again.