profile_spec.rb 665 B

123456789101112131415161718192021222324252627282930313233
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. feature 'Profile' do
  4. include ProfileStories
  5. given(:local_domain) { ENV['LOCAL_DOMAIN'] }
  6. background do
  7. as_a_logged_in_user
  8. with_alice_as_local_user
  9. end
  10. subject { page }
  11. scenario 'I can view Annes public account' do
  12. visit account_path('alice')
  13. is_expected.to have_title("alice (@alice@#{local_domain})")
  14. end
  15. scenario 'I can change my account' do
  16. visit settings_profile_path
  17. fill_in 'Display name', with: 'Bob'
  18. fill_in 'Bio', with: 'Bob is silent'
  19. first('button[type=submit]').click
  20. is_expected.to have_content 'Changes successfully saved!'
  21. end
  22. end