profile_page.rb 446 B

1234567891011121314151617181920
  1. # @author Dumitru Ursu
  2. # Page Object for the user profile page
  3. class ProfilePage
  4. include Capybara::DSL
  5. include Warden::Test::Helpers
  6. include Rails.application.routes.url_helpers
  7. def initialize(user)
  8. @user = user
  9. login_as @user
  10. end
  11. def locale(lang)
  12. visit edit_user_registration_path(:en)
  13. select lang, from: 'user_language'
  14. fill_in 'user_current_password', with: @user.password
  15. click_button 'Update'
  16. end
  17. end