-
Notifications
You must be signed in to change notification settings - Fork 220
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
The name of the screenshot file #1033
Comments
I just found out that I have the same problem. It seems like that all of my previews has this index in the name even when only few of them are using preview parameter so not sure if it is related. But I'm using MultiPreview so that could be the issues. I did some small change which moved all the indexes and suddenly almost all of my previews are marked as changed due filename change. I wonder if this is related to Paparazzi or Showkase 🤔 Edit: seems like a paparazzi issues since name generated from the showkase doesn't contain index: |
Also, as I feel that it is related to this, it would be nice to be able to customize the name of the snapshot. My app has a long a package name which causes that name is too long without any additional value. |
As I found in the code the part {test_name}[{index}{showkase_name}] is the method name because the delimiter is |
I'm already doing this:
This generates a string like However, I've just realized that in my case, the reason this index is present isn't due to |
I was able to solve my issue by realising that some of my previews had the same name so TestParameterInjection automatically added indexing. When I get rid of these then it started to work fine. |
Duplicate of #549 |
Description
I found a problem with file names when we have already added some golden screen values to our repo but then we want to add another one, the previous one may change its name which causes a lot of changes in git history.
The problem causes an integer number placed before a group name.
e.g. {path}[1.{groupName}:{name},1.1,1.light]
The integer number should not be associated with the to not affect other previews?
Is there any way to define screen name by myself? Or add any regex or change the current pattern?
Or other way that will not change the old value when we add now one.
Steps to Reproduce
Add some golden values. Push them to the repo. Add another preview, generate golden values for them.
Expected behavior
The new files should not affect on the old ones.
Additional information:
@edit
I found that the problem is caused by @PreviewParameter. When composable preview has a @PreviewParameter argument, the method name contains an integer but in non-deterministic way. Thats why after any change in previews many of screenshot files change their names
The text was updated successfully, but these errors were encountered: