From 68b9e2cc60923dd188fce15c2de3f059649f0c5a Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Mon, 30 Oct 2023 11:27:50 -0500 Subject: [PATCH] chore: Change h3 to p to fix semantics in empty state component (#285) * chore: Change h3 to p to fix semantics * chore: Fixed broken test --- app/components/viral/empty_state_component.html.erb | 4 ++-- test/components/viral/empty_component_test.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/viral/empty_state_component.html.erb b/app/components/viral/empty_state_component.html.erb index ec864b3080..34507bd4a5 100644 --- a/app/components/viral/empty_state_component.html.erb +++ b/app/components/viral/empty_state_component.html.erb @@ -2,9 +2,9 @@
<%= viral_icon(name: icon_name, color: :primary, classes: "w-20 h-20 shrink mr-4") %>
-

+

<%= title %> -

+

<% if description.present? %>

<%= description %> diff --git a/test/components/viral/empty_component_test.rb b/test/components/viral/empty_component_test.rb index 29fd5daee5..09d1e295c9 100644 --- a/test/components/viral/empty_component_test.rb +++ b/test/components/viral/empty_component_test.rb @@ -7,7 +7,7 @@ class EmptyComponentTest < ViewComponentTestCase test 'default' do render_preview(:default) assert_selector 'span.Viral-Icon svg' - assert_selector 'h3', text: I18n.t(:'groups.show.shared_projects.no_shared.title') + assert_selector 'p', text: I18n.t(:'groups.show.shared_projects.no_shared.title') assert_selector 'p', text: I18n.t(:'groups.show.shared_projects.no_shared.description') end end