Hello! I am developing cypress with snapshot plugi...
# help
s
Hello! I am developing cypress with snapshot plugin library and am currently having a problem with: -hiding scrollbars -when I interact with the DOM (type on an input etc...) the screenshot appears to be zoomed in, hence the scrollbars that appear. Anyone know how I can take care of this?
w
Hi Diego, can you explain this a bit more? Screenshots are different when you interact with the DOM vs not? A specific example would be helpful.
s
Mark! Appreciate a lot you opened this channel, thank you!
However, since you know about testing with snapshot library, I would like to ask you some questions. I understand if you don't get back since it is a slight subject change.
1. Do you know any fixes to the bugs that occur with the blackout option, specifically with the area it should cover? 2.I am having an issue pulling up the css to hide scrollbars in snapshots? Do you know how to do this?
And lastly, where do you think API testing falls with snapshots, since a snapshot of an element working and showing the data it calls from an API is pretty good enough proof that the API is working right?
I am new at all this, have been doing it for 4 months. Appreciate your time Mark, thanks!
w
> 1. Do you know any fixes to the bugs that occur with the blackout option, specifically with the area it should cover? Could you be more specific? Something around blackouts was just fixed in 10.3.1, (here is the issue: https://github.com/cypress-io/cypress/pull/22756) if your problem is different I wonder if you could open a github issue for it. Though I would also check existing issues first as there do seem to be some related to this, and workaround would be in there. > 2.I am having an issue pulling up the css to hide scrollbars in snapshots? Do you know how to do this? You might want to make a custom command like this person suggests, to tweak CSS, do the screenshot, then reset CSS back like it was https://github.com/cypress-io/cypress/issues/5842#issuecomment-1048107917
s
Hello Mark!
Sorry I'll try to be more specific, but the first issue is actually precisely my problem. Great!
On the second, that looks interesting, looking into it already. If you know anything else about handling scrollbars in screenshots I'd appreciate it.
Again, thanks so much for your time man!
Hey Mark, if you're still there I have a pretty big question. It is regarding login with auth0 to a regular web application. We have solved this issue ourselves with an implementation of this library https://github.com/sir-dunxalot/cypress-nextjs-auth0
however, the reason the fix you gave me for blackouts is something I'm thinking on, is because I don't know if this library for nextjs regular web apps login with auth0 will work on cypress 10.3
Do you know if this login issues with auth0 and page change still exists in 10.3?