Skip to content

Commit

Permalink
finish onboarding, wait for page to load
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Sep 22, 2024
1 parent 323748b commit f11b82e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions spec/support/stories/profile_stories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def with_chupacabras_fancy_profile
email: '[email protected]', password: password, confirmed_at: confirmed_at,
account: Fabricate(:account, username: 'chupacabra', note: 'I am gonna getcha!', account_css: @chupacabra_css)
)
Web::Setting.where(user: chupacabra).first_or_initialize(user: chupacabra).update!(data: { introductionVersion: 2018_12_16_044202 })
end

def confirmed_at
Expand Down
7 changes: 4 additions & 3 deletions spec/system/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@
expect(subject).to have_content 'Changes successfully saved!'
end

describe 'with JS', :js do
describe 'with JS', :js, :streaming do
before do
with_chupacabras_fancy_profile
end

it 'Can have custom account_css set' do
visit account_path('chupacabra')
# wait for page to load...
page.find '.account__header'
expect(subject.html).to have_content('background-color: red !important')
expect(subject).to have_xpath('//*[@id="account-css"]')

visit account_path('bob')
page.find '.account__header'
expect(subject.html).to have_no_content('background-color: red !important')
expect(subject).to have_no_xpath('//*[@id="account-css"]')
end
end
end

0 comments on commit f11b82e

Please sign in to comment.