Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix precompile SCSS specs (#11590)

Penar Musaraj79fe97c2bc35
diff --git a/spec/components/stylesheet/manager_spec.rb b/spec/components/stylesheet/manager_spec.rb
index f7727ce536b..5cf9cf5dc93 100644
--- a/spec/components/stylesheet/manager_spec.rb
+++ b/spec/components/stylesheet/manager_spec.rb
@@ -338,7 +338,7 @@ describe Stylesheet::Manager do
it "correctly generates precompiled CSS" do
scheme1 = ColorScheme.create!(name: "scheme1")
scheme2 = ColorScheme.create!(name: "scheme2")
- core_targets = [:desktop, :mobile, :desktop_rtl, :mobile_rtl, :admin]
+ core_targets = [:desktop, :mobile, :desktop_rtl, :mobile_rtl, :admin, :wizard]
theme_targets = [:desktop_theme, :mobile_theme]
color_scheme_targets = ["color_definitions_scheme1_#{scheme1.id}", "color_definitions_scheme2_#{scheme2.id}"]
@@ -352,7 +352,7 @@ describe Stylesheet::Manager do
Stylesheet::Manager.precompile_css
results = StylesheetCache.pluck(:target)
- expect(results.size).to eq(17) # (2 themes x 7 targets) + 3 color schemes (2 themes, 1 base)
+ expect(results.size).to eq(22) # (2 themes x 8 targets) + 6 color schemes (2 custom theme schemes, 4 base schemes)
core_targets.each do |tar|
expect(results.count { |target| target =~ /^#{tar}_(#{scheme1.id}|#{scheme2.id})$/ }).to eq(2)
end
@@ -367,7 +367,7 @@ describe Stylesheet::Manager do
Stylesheet::Manager.precompile_css
results = StylesheetCache.pluck(:target)
- expect(results.size).to eq(22) # (2 themes x 7 targets) + (1 no/default/core theme x 5 core targets) + 3 color schemes (2 themes, 1 base)
+ expect(results.size).to eq(28) # (2 themes x 8 targets) + (1 no/default/core theme x 6 core targets) + 6 color schemes (2 custom theme schemes, 4 base schemes)
core_targets.each do |tar|
expect(results.count { |target| target =~ /^(#{tar}_(#{scheme1.id}|#{scheme2.id})|#{tar})$/ }).to eq(3)