-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add no-unsafe-eval percy snapshot #1474
Conversation
We cannot use testcafe to testcafe to create a no-unsafe-eval test, because testcafe internals rely on eval. Instead, this commit adds a percy snapshot which tests the same thing - that the page loads even with a CSP that disables unsafe-eval. Note we only guarantee no unsafe-eval's for the SearchBar component. I pinned our dev dependency of regenerator-runtime to 0.13.1 to be consistent with the resolution. J=SLAP-1440 TEST=auto
@@ -0,0 +1,32 @@ | |||
import puppeteer from 'puppeteer'; | |||
import percySnapshot from '@percy/puppeteer'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a difference between using @percy/script (PercyScript setup from theme) vs @percy/puppeteer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they've very recently deprecated percyscript https://docs.percy.io/docs/percyscript
percyscript is basically puppetter with some VERY thing wrapping, so it should be incredibly easy to migrate
I mean just looking at the code there's almost no differences besides the boilerplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
We cannot use testcafe to testcafe to create a no-unsafe-eval test, because
testcafe internals rely on eval.
Instead, this commit adds a percy snapshot which tests the same thing - that
the page loads even with a CSP that disables unsafe-eval.
Note we only guarantee no unsafe-eval's for the SearchBar component.
J=SLAP-1440
TEST=auto