FEATURE: themes and components split

* FEATURE: themes and components split

* two seperate methods to switch theme type

* use strict equality operator
This commit is contained in:
Osama Sayegh
2018-08-24 11:30:00 +10:00
committed by Sam
parent 4a552fb967
commit e0cc29d658
29 changed files with 445 additions and 157 deletions
+1 -1
View File
@@ -2609,7 +2609,7 @@ describe Guardian do
theme2.update!(user_selectable: true)
expect(user_guardian.allow_themes?([theme.id, theme2.id])).to eq(false)
theme2.update!(user_selectable: false)
theme2.update!(user_selectable: false, component: true)
theme.add_child_theme!(theme2)
expect(user_guardian.allow_themes?([theme.id, theme2.id])).to eq(true)
expect(user_guardian.allow_themes?([theme2.id])).to eq(false)
+1 -1
View File
@@ -25,7 +25,7 @@ describe Stylesheet::Manager do
theme.save!
child_theme = Fabricate(:theme)
child_theme = Fabricate(:theme, component: true)
child_theme.set_field(target: :common, name: "scss", value: ".child_common{.scss{color: red;}}")
child_theme.set_field(target: :desktop, name: "scss", value: ".child_desktop{.scss{color: red;}}")