-
Notifications
You must be signed in to change notification settings - Fork 23
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
fix: Enable JavaScript for builds #84
Conversation
@@ -39,16 +40,20 @@ | |||
visit 'http://example.com' | |||
Percy.snapshot(page, { name: 'minHeight', minHeight: 2000 }) | |||
end | |||
it 'recognizes enableJavascript' do | |||
visit 'http://example.com' |
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.
This won't actually show anything different with JS on or off. In a follow up PR let's move to testing with https://github.com/percy/sdk-test-website and we can add JS detection to that site.
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.
Yeah, that's the TODO in my PR description. Can you give the SDK team access to that repo? It 404s for me at the moment.
I'm thinking we're going to need to add something like canvas since that isn't captured by our SDKs yet and requires JS to build the element.
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.
🍍 LGTM. I'll write a follow up PR to change this test suite to make use of https://github.com/percy/sdk-test-website since that feels like it's out of scope of this PR
What is this?
Looks like the key that was being passed isn't using the right casing for
@percy/agent
.enableJavascript
is deprecated and apparently doesn't work.enableJavaScript
is the correct way and does work.TODO
What's a good test for this that would surface JS not working in a snapshot? Probably introduce our own page?