Dynamic content for previews #947
-
Some of the previews have dynamic text like lorem or random numbers values just as an example, when I record the golden screenshots all work properly, then if I then verify the screenshots works fine as well, but I have a problem when: Let's suppose we only have 2 golden screenshots recorded A and B, now if I add a new preview C in the project When executing verify task it will fail because C is new To me it makes sense to have dynamic values in my previews, is there a way to tell paparazzi to just record screenshots for new previews?, if not what is the best approach for this scenario? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I think that might be just the question of running (e.g. from Gradle CLI) the specific test that you want to refresh. Then the code that would generate a different screenshot for A and B never executes, so it's never re-written. Alternatively since you're version-controlling golden values (I guess), you can just not commit the modified A and B files; only C, which will be clearly a new file, right? Btw, how does verify work if the data changes? Do you have a high enough percentage diff that varying values are accepted? |
Beta Was this translation helpful? Give feedback.
I think that might be just the question of running (e.g. from Gradle CLI) the specific test that you want to refresh. Then the code that would generate a different screenshot for A and B never executes, so it's never re-written.
Alternatively since you're version-controlling golden values (I guess), you can just not commit the modified A and B files; only C, which will be clearly a new file, right?
Btw, how does verify work if the data changes? Do you have a high enough percentage diff that varying values are accepted?