Skip to content
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

Screenshot name for received image #304

Open
mostor-v opened this issue Aug 23, 2022 · 9 comments
Open

Screenshot name for received image #304

mostor-v opened this issue Aug 23, 2022 · 9 comments

Comments

@mostor-v
Copy link

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?

@10xLaCroixDrinker
Copy link
Member

If you want to update the snapshots, you use the --update flag.

@mostor-v
Copy link
Author

If you want to update the snapshots, you use the --update flag.

But we can't use this flag on CI

@10xLaCroixDrinker
Copy link
Member

Yes, you should not overwrite the snapshots in your CI.

@mostor-v
Copy link
Author

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

@10xLaCroixDrinker
Copy link
Member

If the received image has the same name it will overwrite the snapshot.

@mostor-v
Copy link
Author

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.

@10xLaCroixDrinker
Copy link
Member

Can you explain your use case? I don't understand what you are trying to do or why.

@mostor-v
Copy link
Author

Can you explain your use case? I don't understand what you are trying to do or why.

  1. I have about 300 screenshot tests and all expected screenshots are stored in project.
  2. All of them are running as a part of CI/CD process for each commit
  3. 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.

@reemaka
Copy link

reemaka commented Apr 25, 2023

+1, I'd like to be able to store received images in a separate directory without the -received suffix so that I can easily copy over the new screenshots without having to rename everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants