Open shobhitg opened 4 years ago
@shobhitg
You should use:
.toMatchImageSnapshot({ capture: 'viewport', screenshotConfig: { clip: { x: 0, y: 0, width: 100, height: 100 } } })
Thanks, this worked. However example code in Readme.md is incorrect. Just pointing out.
Created a PR, super minor thing. But will help people who come after me.
Describe the bug
I have this following code:
The screenshot I get is full screen and not a clip. I think this may be a bug.
To Reproduce
Just use the
clip
arg intoMatchImageSnapshot()
function, see that resulting image is not clipped, but rather a full screen image.Expected behavior Expected behavior is that we should see a clipped image in the
__image_screenshots__
folder.Desktop (please complete the following information):
Mac OS version:
10.15.4
Cypress Versions: