FIX: reload styling changes for wizard styling step (#18121)

This commit is contained in:
Arpit Jalan 2022-08-29 15:10:47 +05:30 committed by GitHub
parent e6dba65f18
commit c4bb15441d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -183,6 +183,7 @@ class Wizard
if scheme.is_dark?
updater.update_setting(:default_dark_mode_color_scheme_id, -1)
end
updater.refresh_required = true
end
end

View File

@ -92,6 +92,7 @@ RSpec.describe Wizard::StepUpdater do
updater.update
expect(updater.success?).to eq(true)
expect(wizard.completed_steps?('styling')).to eq(true)
expect(updater.refresh_required?).to eq(true)
theme = Theme.find_by(id: SiteSetting.default_theme_id)
expect(theme.color_scheme.base_scheme_id).to eq('Dark')
end
@ -112,6 +113,7 @@ RSpec.describe Wizard::StepUpdater do
homepage_style: 'latest'
)
expect { updater.update }.not_to change { Theme.count }
expect(updater.refresh_required?).to eq(true)
theme.reload
expect(theme.color_scheme.base_scheme_id).to eq('Neutral')
end