Skip to content

Commit

Permalink
Add ruby test for color prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ASPhillips8 committed Dec 20, 2024
1 parent b086fac commit 43918c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions playbook/spec/pb_kits/playbook/kits/section_seperator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
is_expected.to define_boolean_prop(:dark)
.with_default(false)
}
it {
is_expected.to define_enum_prop(:color)
.with_default("default")
.with_values("default", "primary")
}

describe "#classname" do
it "returns namespaced class name", :aggregate_failures do
Expand All @@ -29,6 +34,9 @@
expect(subject.new(orientation: "vertical", classname: "additional_class", dark: true).classname).to eq "pb_section_separator_kit_card_vertical additional_class dark"
expect(subject.new(classname: "additional_class", dark: true).classname).to eq "pb_section_separator_kit_card_horizontal additional_class dark"
expect(subject.new(line_style: "dashed").classname).to eq "pb_section_separator_kit_card_horizontal_dashed"
expect(subject.new(color: "primary").classname).to eq "pb_section_separator_kit_card_horizontal_color_primary"
expect(subject.new(color: "primary", orientation: "vertical", dark: true).classname).to eq "pb_section_separator_kit_card_vertical_color_primary dark"
expect(subject.new(color: "default", line_style: "dashed").classname).to eq "pb_section_separator_kit_card_horizontal_dashed"
end
end
end

0 comments on commit 43918c9

Please sign in to comment.