I created a simple Rails 4 app that uses Facebook to login. I'm writing a feature test that would allow me to sign in to Github and verify that it redirects back to my home page.
The problem:
- Facebook app is configured to respond to
localhost:5000
. - Selenium browser launches app in
127.0.0.1:5723
So the login fails.
``` require 'rails_helper'
describe 'the registration process', js: true do it 'signs me in using Github' do visit root_path
click_link 'Sign up / Login'
find("a[href='/users/auth/facebook']").click
within('.auth-form-body') do
fill_in 'login', with: 'foobar'
fill_in 'password', with: 'barbaz'
end
click_button 'Sign in'
end end ```
What can I do to configure Selenium to use the same old localhost:5000
?