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

Ew replace phantomjs with selenium 2 #1718

Merged

Conversation

EWright212
Copy link
Contributor

Updated the discontinued phantomjs with selenuim webdirvers and fixed related tests.
Update of pull request to be based off master branch instead of unmerged pull requests.

Copy link
Collaborator

@pablobm pablobm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you so much! 👍

Copy link
Collaborator

@pablobm pablobm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I realised on second view that there were a couple of minor issues. Mind having a look?

Also, the file tmp/pids/.keep has been removed. No surprise as there's something going on where it's deleted every time the server runs. I have noticed it before and I don't know what's going on. @nickcharlton, any ideas as to why?

For now, if you could just reinstate it with touch tmp/pids/.keep, that would be great.

@@ -6,7 +6,7 @@

require "rspec/rails"
require "shoulda/matchers"
require "capybara/poltergeist"
require 'selenium/webdriver'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I missed this. Mind changing the single quotes to double, for consistency?

Comment on lines 45 to 47
Capybara::Selenium::Driver.new app,
browser: :chrome,
desired_capabilities: capabilities
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this style of indent problematic. It breaks the indent for all lines if the first one is replaced with one of different length. How about writing it like this?

Suggested change
Capybara::Selenium::Driver.new app,
browser: :chrome,
desired_capabilities: capabilities
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: capabilities,
)

To be honest, I'm not sure if we have a style rule for this, and Hound appears not to be enabled at the moment? @nickcharlton, do you have any thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the tmp/pids/.keep. I tried to fix the first clone problem you'd get in #1695, do we need to ignore that file too so if you delete it locally it doesn't matter?

Hound did run with this PR. It might've been done when the configuration in thoughtbot/guides was deleted. It got put back in again, so we might be alright now. A new push might highlight the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pablobm This indentation style was suggested by Houndbot, as was many of the changes you and Nick asked me to undo in this commit. I like yours better though!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, sorry about that. Normally we follow Hound's opinion to the letter, but a couple of weeks ago there was an issue with it. The set of rules changed and I'm not sure they are back to normal yet.

Don't worry then. Go with your preference and we'll come around to fixing Hound in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it’s been really annoying. I don’t much like commenting on style things manually, as even though consistency is good, nit-picking to the nth degree is not enjoyable for anyone!

I think there’s only one or two things left here: everything we can fix on GitHub apart from the tmp/pids/.keep file missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think I've fixed all the issues now from the houndbot to the tmp/pids/.keep (which was in the gitignore so wasn't getting pushed). Thanks @nickcharlton

Copy link
Member

@nickcharlton nickcharlton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a manual style suggestion run, so if you hit those you should be mostly good to go with all of those.

Hopefully Hound will work on the next PR so we don't have to do it ourselves 😅

Gemfile Outdated Show resolved Hide resolved
spec/features/log_entries_index_spec.rb Outdated Show resolved Hide resolved
spec/features/orders_index_spec.rb Outdated Show resolved Hide resolved
spec/features/orders_index_spec.rb Outdated Show resolved Hide resolved
spec/rails_helper.rb Outdated Show resolved Hide resolved
EWright212 and others added 2 commits July 24, 2020 11:45
Co-authored-by: Nick Charlton <nick@nickcharlton.net>
Co-authored-by: Nick Charlton <nick@nickcharlton.net>
spec/rails_helper.rb Show resolved Hide resolved
@pablobm
Copy link
Collaborator

pablobm commented Jul 24, 2020

Mind just adding back that tmp/pids/.keep file then?

spec/rails_helper.rb Show resolved Hide resolved
spec/features/orders_index_spec.rb Show resolved Hide resolved
spec/features/log_entries_index_spec.rb Show resolved Hide resolved
Gemfile Show resolved Hide resolved
Copy link
Member

@nickcharlton nickcharlton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm going to merge this now.

@nickcharlton nickcharlton merged commit 3aaafef into thoughtbot:master Jul 30, 2020
nickcharlton pushed a commit that referenced this pull request Jul 30, 2020
Replaced phantomjs with selenium in gemfile and rails_helper, as phantomjs has been
discontinued. Three tests currently failing due to new webdriver:

```
click_on t()
```

…which are fixed with:

```
accept_confirm do
	click_on t()
end
```
@pablobm pablobm mentioned this pull request Jul 30, 2020
nickcharlton pushed a commit that referenced this pull request Jul 31, 2020
When #1718 was merged, it introduced a potential solution to /tmp/pids/.keep
being unintentionally deleted. Unfortunately this didn't fix the issue and in fact
seems to have made it worse.

The issue may have been solved already, and it was only surfacing again
when moving between commits that included #a0eeca6 and those that didn't.

The changes I'm proposing to gitignore are as currently generated in new Rails
apps.
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.

3 participants