mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Add site setting and wizard step to set base font (#10250)
Co-authored-by: Neil Lalonde <neillalonde@gmail.com>
This commit is contained in:
@@ -167,6 +167,16 @@ describe Wizard::StepUpdater do
|
||||
end
|
||||
end
|
||||
|
||||
context "fonts step" do
|
||||
it "updates the font" do
|
||||
updater = wizard.create_updater('fonts', font_previews: 'open_sans')
|
||||
updater.update
|
||||
expect(updater.success?).to eq(true)
|
||||
expect(wizard.completed_steps?('fonts')).to eq(true)
|
||||
expect(SiteSetting.base_font).to eq('open_sans')
|
||||
end
|
||||
end
|
||||
|
||||
context "colors step" do
|
||||
context "with an existing color scheme" do
|
||||
fab!(:color_scheme) { Fabricate(:color_scheme, name: 'existing', via_wizard: true) }
|
||||
|
||||
@@ -41,6 +41,15 @@ describe Wizard::Builder do
|
||||
expect(invites_step.disabled).to be_truthy
|
||||
end
|
||||
|
||||
context 'fonts step' do
|
||||
let(:fonts_step) { wizard.steps.find { |s| s.id == 'fonts' } }
|
||||
let(:field) { fonts_step.fields.first }
|
||||
|
||||
it 'should set the right font' do
|
||||
expect(field.choices.size).to eq(DiscourseFonts.fonts.size)
|
||||
end
|
||||
end
|
||||
|
||||
context 'logos step' do
|
||||
let(:logos_step) { wizard.steps.find { |s| s.id == 'logos' } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user