From 2db498aaa2d797201334d02c1f325ff131e7a644 Mon Sep 17 00:00:00 2001 From: Martin Emde Date: Thu, 21 Nov 2024 19:41:55 -0800 Subject: [PATCH] use section for card component --- app/views/components/card_component.rb | 2 +- test/views/card_component_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/components/card_component.rb b/app/views/components/card_component.rb index 7858d1664bc..236975a1a7f 100644 --- a/app/views/components/card_component.rb +++ b/app/views/components/card_component.rb @@ -6,7 +6,7 @@ class CardComponent < ApplicationComponent def view_template(&) color = "bg-white dark:bg-black border border-neutral-200 dark:border-neutral-800 text-neutral-900 dark:text-white " box = "w-full px-4 py-6 md:p-10 mb-10 rounded-md shadow overflow-hidden" - article(**classes(color, box), &) + section(**classes(color, box), &) end def head(title = nil, icon: nil, count: nil, url: nil, **options, &block) diff --git a/test/views/card_component_test.rb b/test/views/card_component_test.rb index a36daccf46f..20e355e2d7e 100644 --- a/test/views/card_component_test.rb +++ b/test/views/card_component_test.rb @@ -16,7 +16,7 @@ def render(...) end end - assert_selector "article" + assert_selector "section" assert_selector "h3", text: "Gems" assert_selector "svg.fill-orange" assert_selector "span", text: "3" @@ -36,7 +36,7 @@ def render(...) end end - assert_selector "article" + assert_selector "section" assert_selector "h3", text: "History" assert_text "content" refute_text "View all"