mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 22:35:03 +08:00
Simplify theme and color scheme seeding (#10872)
Now that we have support for user-selectable color schemes, it makes sense to simplify seeding and theme updates in the wizard. We now: - seed only one theme, named "Default" (previously "Light") - seed a user-selectable Dark color scheme - rename the "Themes" wizard step to "Colors" - update the default theme's color scheme if a default is set (a new theme is created if there is no default)
This commit is contained in:
@ -450,12 +450,16 @@ describe ApplicationHelper do
|
||||
end
|
||||
|
||||
describe "dark_color_scheme?" do
|
||||
it 'returns nil for the base color scheme' do
|
||||
it 'returns false for the base color scheme' do
|
||||
expect(helper.dark_color_scheme?).to eq(false)
|
||||
end
|
||||
|
||||
it 'works correctly for a dark scheme' do
|
||||
dark_theme = Theme.where(name: "Dark").first
|
||||
dark_theme = Theme.create(
|
||||
name: "Dark",
|
||||
user_id: -1,
|
||||
color_scheme_id: ColorScheme.find_by(base_scheme_id: "Dark").id
|
||||
)
|
||||
helper.request.env[:resolved_theme_ids] = [dark_theme.id]
|
||||
|
||||
expect(helper.dark_color_scheme?).to eq(true)
|
||||
|
Reference in New Issue
Block a user