Consolidate system specs into single directory, use rspec tags for configuration (#30206)
This commit is contained in:
parent
164b09bfcc
commit
0d397db5dd
30 changed files with 32 additions and 47 deletions
33
spec/system/profile_spec.rb
Normal file
33
spec/system/profile_spec.rb
Normal file
|
@ -0,0 +1,33 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'Profile' do
|
||||
include ProfileStories
|
||||
|
||||
subject { page }
|
||||
|
||||
let(:local_domain) { ENV['LOCAL_DOMAIN'] }
|
||||
|
||||
before do
|
||||
as_a_logged_in_user
|
||||
with_alice_as_local_user
|
||||
end
|
||||
|
||||
it 'I can view Annes public account' do
|
||||
visit account_path('alice')
|
||||
|
||||
expect(subject).to have_title("alice (@alice@#{local_domain})")
|
||||
end
|
||||
|
||||
it '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
|
||||
|
||||
expect(subject).to have_content 'Changes successfully saved!'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue