From c4bb15441dd09de55b2b515b6ba3b43ba265203c Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 29 Aug 2022 15:10:47 +0530 Subject: [PATCH] FIX: reload styling changes for wizard styling step (#18121) --- lib/wizard/builder.rb | 1 + spec/lib/wizard/step_updater_spec.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index 89aaf3ca5ee..716d2c65a99 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -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 diff --git a/spec/lib/wizard/step_updater_spec.rb b/spec/lib/wizard/step_updater_spec.rb index 5a0f4ab7df1..9a6e41dddd5 100644 --- a/spec/lib/wizard/step_updater_spec.rb +++ b/spec/lib/wizard/step_updater_spec.rb @@ -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