From 9cbc519a698d8c0470ecdc63a20afb7d472f5e3a Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Sat, 31 Aug 2024 23:45:25 -0700 Subject: [PATCH] give alice da css becvause there's something wrong with making the account --- spec/support/stories/profile_stories.rb | 19 +++++-------------- spec/system/profile_spec.rb | 9 ++++----- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/spec/support/stories/profile_stories.rb b/spec/support/stories/profile_stories.rb index cad06a17e57426..c85e5e7da0eb69 100644 --- a/spec/support/stories/profile_stories.rb +++ b/spec/support/stories/profile_stories.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module ProfileStories - attr_reader :bob, :alice, :alice_bio, :chupacabra, :chupacabra_css + attr_reader :bob, :alice, :alice_bio, :alice_css def fill_in_auth_details(email, password) fill_in 'user_email', with: email @@ -35,25 +35,16 @@ def with_alice_as_local_user @alice_bio = '@alice and @bob are fictional characters commonly used as' \ 'placeholder names in #cryptology, as well as #science and' \ 'engineering 📖 literature. Not affiliated with @pepe.' - - @alice = Fabricate( - :user, - email: 'alice@example.com', password: password, confirmed_at: confirmed_at, - account: Fabricate(:account, username: 'alice', note: @alice_bio) - ) - end - - def with_chupacabras_fancy_profile - @chupacabra_css = <<~CSS + @alice_css = <<~CSS body { background-color: red !important; } CSS - @chupacabra = Fabricate( + @alice = Fabricate( :user, - email: 'chupacabra@example.com', password: password, confirmed_at: confirmed_at, - account: Fabricate(:account, username: 'chupacabra', note: 'I am gonna getcha!', account_css: @chupacabra_css) + email: 'alice@example.com', password: password, confirmed_at: confirmed_at, + account: Fabricate(:account, username: 'alice', note: @alice_bio, account_css: @alice_css) ) end diff --git a/spec/system/profile_spec.rb b/spec/system/profile_spec.rb index 82ddb07fb5a809..123f68c7e43971 100644 --- a/spec/system/profile_spec.rb +++ b/spec/system/profile_spec.rb @@ -12,7 +12,6 @@ before do as_a_logged_in_user with_alice_as_local_user - with_chupacabras_fancy_profile end it 'I can view Annes public account' do @@ -33,12 +32,12 @@ end it 'Can have custom account_css set', :js do - visit account_path('chupacabra') - expect(subject).to have_content('background-color: red !important') + visit account_path('alice') + expect(subject.html).to have_content('background-color: red !important') expect(subject).to have_xpath('//*[@id="account-css"]') - visit account_path('alice') - expect(subject).to have_no_content('background-color: red !important') + visit account_path('bob') + expect(subject.html).to have_no_content('background-color: red !important') expect(subject).to have_no_xpath('//*[@id="account-css"]') end end