This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-01-02 17:44:06 -08:00
|
|
|
# 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
|
2022-10-20 05:35:29 -07:00
|
|
|
|
2020-01-02 17:44:06 -08:00
|
|
|
fill_in 'Display name', with: 'Bob'
|
|
|
|
fill_in 'Bio', with: 'Bob is silent'
|
|
|
|
|
2022-10-20 05:35:29 -07:00
|
|
|
first('button[type=submit]').click
|
2020-01-02 17:44:06 -08:00
|
|
|
|
2022-10-20 05:35:29 -07:00
|
|
|
is_expected.to have_content 'Changes successfully saved!'
|
2020-01-02 17:44:06 -08:00
|
|
|
end
|
|
|
|
end
|