nvh95 / jest-preview

Debug your Jest tests. Effortlessly.🛠🖼
https://www.jest-preview.com
MIT License
2.34k stars 76 forks source link

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

Open sibelius opened 1 year ago

sibelius commented 1 year ago

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

nvh95 commented 1 year ago

@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.