Skip to content

Instantly share code, notes, and snippets.

@jzelenkov
Last active August 29, 2015 14:08
Show Gist options
  • Save jzelenkov/7dcaec4333c20e73d7d1 to your computer and use it in GitHub Desktop.
Save jzelenkov/7dcaec4333c20e73d7d1 to your computer and use it in GitHub Desktop.
require 'test_helper'
class IntroductionTest < ActionDispatch::IntegrationTest
test "guided user introduction" do
visit app_path
find('#get_started_link').must_be :visible?
click_link 'Get started now! Sign up!'
find('#get_started').must_be :visible?
find('#get_started #new_user').must_be :visible?
find('#get_started #user_city').must_be :visible?
within('#get_started') do
fill_in 'user_born_on', with: '02/02/1988'
select '♀', from: 'user_female'
select 'Berlin', from: 'user_city' # Capybara::ElementNotFound: Unable to find option "Berlin"
end
click_button 'next'
end
end
@jzelenkov
Copy link
Author

#user_city is populated with the results of the AJAX call within geofill().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment