Skip to content
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

Merged
merged 3 commits into from
May 23, 2019
Merged

fix: Enable JavaScript for builds #84

merged 3 commits into from
May 23, 2019

Conversation

Robdel12
Copy link
Contributor

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?

@Robdel12 Robdel12 requested a review from a team May 23, 2019 15:03
@@ -39,16 +40,20 @@
visit 'http://example.com'
Percy.snapshot(page, { name: 'minHeight', minHeight: 2000 })
end
it 'recognizes enableJavascript' do
visit 'http://example.com'
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@djones djones left a 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

@Robdel12 Robdel12 merged commit 84c1e33 into master May 23, 2019
@Robdel12 Robdel12 deleted the rd/enable_js branch May 23, 2019 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants