jest-preview icon indicating copy to clipboard operation
jest-preview copied to clipboard

Can we save the "debug" preview as an image snapshot?

Open sibelius opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe.

It is not a problem.

It helps us understand if something changed in the UI of our tests.

Like a regression UI test

Describe the solution you'd like

Another command saveSnapshot() similar to jest .toMatchSnapshot() that saves an image colocated to the test file

Describe how should jest-preview implements this feature

Take a screenshot from the browser that jest-preview opens

Describe alternatives you've considered

There are other packages doing this, but neither as easy to use

Additional context

Just an improvement for this awesome package

sibelius avatar Feb 16 '23 11:02 sibelius

@sibelius Thanks for your suggestion. I was about to implement this but haven't finished yet. Instead of saving an image, I was thinking of saving an HTML file. The draft work can be seen in #219

I will give you an update when there is any new update.

nvh95 avatar Feb 17 '23 04:02 nvh95