From 7e1ca2bfe7f3f57fea45f69871494cf3a89fa153 Mon Sep 17 00:00:00 2001 From: Aaron Contreras Date: Mon, 27 Nov 2023 14:37:59 -0500 Subject: [PATCH] Add spec for `list_id` rendering on `BorderBox` --- test/components/beta/border_box_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/components/beta/border_box_test.rb b/test/components/beta/border_box_test.rb index 50d60e21fe..229cc45a34 100644 --- a/test/components/beta/border_box_test.rb +++ b/test/components/beta/border_box_test.rb @@ -60,6 +60,15 @@ def test_renders_multiple_rows assert_selector("li.Box-row", count: 3) end + def test_renders_the_list_element_with_an_id_if_provided + render_inline(Primer::Beta::BorderBox.new(list_id: "an-id")) do |component| + component.with_row { "First" } + end + + assert_selector("ul#an-id", count: 1) + assert_selector("li.Box-row", count: 1) + end + def test_renders_condensed render_inline(Primer::Beta::BorderBox.new(padding: :condensed)) do |component| component.with_body { "Body" }