OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
chore[#48620] Allow attribute group content
Kabiru Mwenja728c51b6ebd6
diff --git a/app/components/attribute_groups/attribute_group_component.html.erb b/app/components/attribute_groups/attribute_group_component.html.erbindex 705138aaba1..8068eebbf05 100644--- a/app/components/attribute_groups/attribute_group_component.html.erb+++ b/app/components/attribute_groups/attribute_group_component.html.erb@@ -6,4 +6,8 @@<%= attribute_key_value %><% end %></div>++ <div class="attributes-group--content">+ <%= content %>+ </div></div>diff --git a/spec/components/attribute_groups/attribute_group_component_spec.rb b/spec/components/attribute_groups/attribute_group_component_spec.rbindex 82740b2439d..ddfcb34f5ad 100644--- a/spec/components/attribute_groups/attribute_group_component_spec.rb+++ b/spec/components/attribute_groups/attribute_group_component_spec.rb@@ -58,4 +58,19 @@ RSpec.describe AttributeGroups::AttributeGroupComponent, type: :component dohave_css('.attributes-key-value--value.-text', text: 'Attribute Value 2')endend++ it 'renders content when provided' do+ render_inline(described_class.new) do |component|+ component.with_group_header(title: "A Title")++ "Raw Content"+ end++ expect(page).to have_css('.attributes-group--content', text: 'Raw Content')++ aggregate_failures 'group header' do+ expect(page).to have_css('.attributes-group')+ expect(page).to have_css('h3.attributes-group--header-text', text: 'A Title')+ end+ endend