Skip to content

Instantly share code, notes, and snippets.

@fivetwentysix
Created January 3, 2011 06:12
Show Gist options
  • Select an option

  • Save fivetwentysix/763171 to your computer and use it in GitHub Desktop.

Select an option

Save fivetwentysix/763171 to your computer and use it in GitHub Desktop.
Given /^a user is logged in as "(.*)"$/ do |email|
visit "/users/sign_up"
fill_in("Business email", :with => email)
fill_in("Password", :with => '123123')
fill_in("Password confirmation", :with => '123123')
fill_in("Name", :with => 'Tester Wester')
fill_in("Home number", :with => '12341234')
fill_in("Business number", :with => '23451234')
fill_in("Mobile number", :with => '55555555')
fill_in("Personal email", :with => 'some@gmail.com')
date = page.locate(:css, '#user_date_of_birth')
date.trigger(:focus)
fill_in("Nationality", :with => 'USA')
fill_in("Photo", :with => "#{::Rails.root.to_s}/test/fixtures/sample_photo.jpg")
click_button("Sign up")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment