about summary refs log tree commit diff
path: root/spec/features/profile_spec.rb
blob: ec4f9a53fe6e67600de8179ad33607321714ebf8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true

require 'rails_helper'

feature 'Profile' do
  include ProfileStories

  given(:local_domain) { ENV['LOCAL_DOMAIN'] }

  background do
    as_a_logged_in_user
    with_alice_as_local_user
  end

  subject { page }

  scenario 'I can view Annes public account' do
    visit account_path('alice')

    is_expected.to have_title("alice (@alice@#{local_domain})")
  end

  scenario 'I can change my account' do
    visit settings_profile_path

    fill_in 'Display name', with: 'Bob'
    fill_in 'Bio', with: 'Bob is silent'

    first('button[type=submit]').click

    is_expected.to have_content 'Changes successfully saved!'
  end
end