A platform for community discussion. Free, open, simple.
FIX: reload styling changes for wizard styling step (#18121)
Arpit Jalanc4bb15441dd0
diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rbindex 89aaf3ca5ee..716d2c65a99 100644--- a/lib/wizard/builder.rb+++ b/lib/wizard/builder.rb@@ -183,6 +183,7 @@ class Wizardif scheme.is_dark?updater.update_setting(:default_dark_mode_color_scheme_id, -1)end+ updater.refresh_required = trueendenddiff --git a/spec/lib/wizard/step_updater_spec.rb b/spec/lib/wizard/step_updater_spec.rbindex 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 doupdater.updateexpect(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 dohomepage_style: 'latest')expect { updater.update }.not_to change { Theme.count }+ expect(updater.refresh_required?).to eq(true)theme.reloadexpect(theme.color_scheme.base_scheme_id).to eq('Neutral')end