-
Notifications
You must be signed in to change notification settings - Fork 260
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
Replace PhantomJS with Chromium #691
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a28891a
Replacing abandoned PhantomJS with Chromium
mmx900 a9a3ff9
Fixing "Refuge is not defined" error
mmx900 85bf4c0
Removing unnecessary workaround
mmx900 133e1d7
Increasing timeout to prevent PendingConnectionError
mmx900 69cb0f3
Remove comments that are no longer needed
mmx900 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Seems like this is mostly just moving to modern JS promises instead of JQuery stuff. Which is good, I suppose, perhaps not using standard promises was why this spec broke? Hmm.
Anyhow, it's working, which is the most important thing!
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.
I'm actually a little bit unclear why we were defining this as
Refuge.Library.Geocoder.getCurrentLocation()
before, and it's being defined asnavigator.geolocation.getCurrentPosition()
now.But, unfortunately, I'm just not very versed in the underlying code of this web app, I've been focused on bugfixes and dependency updates. So, if this works, I'm inclined to believe it is the right thing to do.
Would like to understand better why it worked as
Refuge.Library.Geocoder.getCurrentLocation()
before, stopped working, and works asnavigator.geolocation.getCurrentPosition()
now. But I'm not sure if it's worth it to hold up the PR until this can be explained better, and my not understanding it may be down to my own unfamiliarity with the code to begin with.I can mainly say the new code looks cleaner and more readable, that's about it. To be quite transparent.
Thank you anyway! Regardless of if you wish to try to explain this or not, the fix is appreciated either way!
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.
At the time that the code was written(69d417),
Geocoder
wasRefuge.Library.Geocoder
(69d417). Then It was rewritten toGeocoder
, applying ES6/Webpacker. However, this change did not cause any test failure for two reasons :js_errors: false
. So you could replace the code with anything likeasdf.qwer.blah()
without causing any test failure.mock_location
inrestroom_spec.rb
seems never to have been written completely since cd52015 except for one test that didn't require an exact location. Some expectation codes are still commented out, and some specs are just wrapped with#rubocop:disable RSpec/NoExpectationExample
. So I think that the return values ofgetCurrentLocation()
would never be a problem. I'll try to complete them later.Thanks for review this PR.