Webpages behind Netlify Authentication not showing css in Percy snapshot #420
Replies: 3 comments 8 replies
-
Hey @bennymeade! I don't have access to those netlify features but it looks like they do auth via JWT. https://docs.netlify.com/visitor-access/password-protection/ You can look at the network requests that are being made in your browser after logging in to check, but it looks like you can pass an Or you could enable basic auth and provide that header: https://docs.netlify.com/visitor-access/password-protection/#selective-protection-with-basic-authentication |
Beta Was this translation helpful? Give feedback.
-
@bennymeade , I am also facing similar issue, Can you please help me on this. percy taking snapshot with blank page |
Beta Was this translation helpful? Give feedback.
-
Hi @Robdel12 our Netlify site is protected by a password, which when entered creates a session cookie. It's not using JWT and unfortunately I have no say over how this is implemented. I mentioned above my method for handling this with Cypress: POST request the password to the site which responds with a 302 response redirecting us back to the authenticated site (with session cookie). Is it possible to do similar with Percy config? |
Beta Was this translation helpful? Give feedback.
-
Our test environment sites have recently moved from Basic Authentication to Netlify Authentication.
For Basic Authentication I was successfully utilising the
.percy.js
config:But now for Netlify Authentication, I don't know how to handle this authentication type and the result is that all our snapshots are without css (see attached image).
In our Cypress tests we POST the
password
to the site which responds with a 302 response redirecting us back to the authenticated site (with session cookie):Any help or guidance on how to get around this would be greatly appreciated?
Beta Was this translation helpful? Give feedback.
All reactions