diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php index 79daf6dde153b48f5dea5f9f69a0f3a71309f003..6c5734deeead0a3493aae07d6d3cdeb416107110 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php @@ -159,9 +159,9 @@ class ContentRowTest extends ParagraphsTestBase { // Assert the paragraphs where added into the right side column. $content = $crawler->filter('div.col-md-9'); $this->assertCount(1, $content); - $rich_text_title = $content->filter('h4.fw-bold.mb-4'); + $rich_text_title = $content->filter('h2.bcl-heading')->eq(0); $this->assertSame('Title rich text test 1', trim($rich_text_title->text())); - $links_block_title = $content->filter('h2.bcl-heading'); + $links_block_title = $content->filter('h2.bcl-heading')->eq(1); $this->assertSame('Links block test', $links_block_title->text()); $facts_figures = $content->filter('div.bcl-fact-figures--default'); $this->assertStringContainsString('Facts and Figures test', $facts_figures->filter('h2.bcl-heading')->text()); @@ -169,7 +169,7 @@ class ContentRowTest extends ParagraphsTestBase { $this->assertStringContainsString('Maecenas id urna eleifend', $blockquote_blockquote->text()); $blockquote_footer = $content->filter('figcaption.blockquote-footer'); $this->assertSame('Quote 1', trim($blockquote_footer->text())); - $social_media_title = $content->filter('h2.bcl-heading')->eq(2); + $social_media_title = $content->filter('h2.bcl-heading')->eq(3); $this->assertStringContainsString('Social media block', $social_media_title->text()); $accordion_items = $content->filter('.accordion-item'); $this->assertStringContainsString('Accordion item 1', $accordion_items->eq(0)->text()); diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php index b1b1280adf2ab51a889bd33c3f4fdc21e3e9d53c..162a3ed679d06b5b82a61941d2639b8f134661bc 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php @@ -69,12 +69,12 @@ class DescriptionListTest extends ParagraphsTestBase { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $this->assertCount(1, $crawler->filter('h4')); + $this->assertCount(1, $crawler->filter('h2.bcl-heading')); $this->assertCount(1, $crawler->filter('dl.d-md-grid.grid-3-9')); $this->assertCount(2, $crawler->filter('dd')); $this->assertCount(2, $crawler->filter('dt')); - $title = $crawler->filter('h4.fw-bold.mb-4'); + $title = $crawler->filter('h2.bcl-heading'); $this->assertEquals('Description list paragraph', $title->text()); $term_1 = $crawler->filter('dl > div:nth-child(1) > dt'); @@ -100,7 +100,7 @@ class DescriptionListTest extends ParagraphsTestBase { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $title = $crawler->filter('h4.fw-bold.mb-4'); + $title = $crawler->filter('h2.bcl-heading'); $this->assertEquals('Description list paragraph', $title->text()); $term_1 = $crawler->filter('dl > dt:nth-child(1)'); diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/RichTextTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/RichTextTest.php index 609a5bb08702ba6a5e04f611ec3345dff883696d..e195b7b49cca35b48264beecc53b8d0dd26acebd 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/RichTextTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/RichTextTest.php @@ -45,7 +45,7 @@ class RichTextTest extends ParagraphsTestBase { $html = $this->renderParagraph($paragraph); $crawler = new Crawler($html); - $title = $crawler->filter('h4'); + $title = $crawler->filter('h2'); $this->assertCount(1, $title); $this->assertStringContainsString( 'Rich text example', diff --git a/templates/paragraphs/paragraph--oe-description-list.html.twig b/templates/paragraphs/paragraph--oe-description-list.html.twig index a78c5d6e4fdb5aa33b7c19fb0e75022ab2ebb7bb..d10b468d7353241c8c5d04d8c01fd6784a720541 100644 --- a/templates/paragraphs/paragraph--oe-description-list.html.twig +++ b/templates/paragraphs/paragraph--oe-description-list.html.twig @@ -8,7 +8,9 @@ #} {% if title is not empty %} - <h4 class="fw-bold mb-4">{{ title }}</h4> + {% include '@oe-bcl/bcl-heading/heading.html.twig' with { + title: title, + } only %} {% endif %} {{ pattern('description_list', { diff --git a/templates/paragraphs/paragraph--oe-rich-text.html.twig b/templates/paragraphs/paragraph--oe-rich-text.html.twig index 8024655618529752a8a8f7b5c77c4af940ce6248..3547defacd64d2b718f545b4243984ba9396ec03 100644 --- a/templates/paragraphs/paragraph--oe-rich-text.html.twig +++ b/templates/paragraphs/paragraph--oe-rich-text.html.twig @@ -6,5 +6,7 @@ * @see ./modules/contrib/paragraphs/templates/paragraph.html.twig */ #} -<h4 class="fw-bold mb-4">{{ content.field_oe_title }}</h4> +{% include '@oe-bcl/bcl-heading/heading.html.twig' with { + title: content.field_oe_title, +} only %} {{ content|without('field_oe_title') }}