mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 07:01:13 +08:00
FIX: reload styling changes for wizard styling step (#18121)
This commit is contained in:
@ -183,6 +183,7 @@ class Wizard
|
|||||||
if scheme.is_dark?
|
if scheme.is_dark?
|
||||||
updater.update_setting(:default_dark_mode_color_scheme_id, -1)
|
updater.update_setting(:default_dark_mode_color_scheme_id, -1)
|
||||||
end
|
end
|
||||||
|
updater.refresh_required = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ RSpec.describe Wizard::StepUpdater do
|
|||||||
updater.update
|
updater.update
|
||||||
expect(updater.success?).to eq(true)
|
expect(updater.success?).to eq(true)
|
||||||
expect(wizard.completed_steps?('styling')).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)
|
theme = Theme.find_by(id: SiteSetting.default_theme_id)
|
||||||
expect(theme.color_scheme.base_scheme_id).to eq('Dark')
|
expect(theme.color_scheme.base_scheme_id).to eq('Dark')
|
||||||
end
|
end
|
||||||
@ -112,6 +113,7 @@ RSpec.describe Wizard::StepUpdater do
|
|||||||
homepage_style: 'latest'
|
homepage_style: 'latest'
|
||||||
)
|
)
|
||||||
expect { updater.update }.not_to change { Theme.count }
|
expect { updater.update }.not_to change { Theme.count }
|
||||||
|
expect(updater.refresh_required?).to eq(true)
|
||||||
theme.reload
|
theme.reload
|
||||||
expect(theme.color_scheme.base_scheme_id).to eq('Neutral')
|
expect(theme.color_scheme.base_scheme_id).to eq('Neutral')
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user