diff --git a/composer.json b/composer.json index 8e327e742..dc33a4d10 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "openeuropa/behat-transformation-context": "^0.2", "openeuropa/code-review": "^2.0.0-alpha6", "openeuropa/oe_contact_forms": "^1.14", - "openeuropa/oe_content": "^3.0.0", + "openeuropa/oe_content": "^4.0.0", "openeuropa/oe_corporate_blocks": "^4.19", "openeuropa/oe_corporate_countries": "^2.0.0", "openeuropa/oe_corporate_site_info": "^1.0.0-alpha8", @@ -70,6 +70,9 @@ } }, "autoload-dev": { + "classmap": [ + "build/core/modules/field/tests/src/Traits/EntityReferenceFieldCreationTrait.php" + ], "psr-4": { "Drupal\\Tests\\oe_theme\\": "./tests/src/", "Drupal\\Tests\\oe_content\\": "./build/modules/contrib/oe_content/tests/src/", @@ -113,7 +116,8 @@ }, "_readme": [ "behat/mink-selenium2-driver locked to 1.6.x as version 1.7.0 introduces issues with mouse dragging and keyboard key events.", - "Explicit requirement of nikic/php-parser as ^5.0 generates GrumPHP Parser issues." + "Explicit requirement of nikic/php-parser as ^5.0 generates GrumPHP Parser issues.", + "autoload-dev: explicitly mapping EntityReferenceFieldCreationTrait to prevent failures." ] }, "config": { diff --git a/templates/compositions/ec-component-content-item-block/content-item-block.html.twig b/templates/compositions/ec-component-content-item-block/content-item-block.html.twig index c77e7080f..eefdcdc95 100644 --- a/templates/compositions/ec-component-content-item-block/content-item-block.html.twig +++ b/templates/compositions/ec-component-content-item-block/content-item-block.html.twig @@ -1,23 +1,24 @@ {% apply spaceless %} {# - /** - * @file - * Theme implementation for a ECL Content Item Block. - */ - Parameters: - - "type" (string) (default: 'one'): Type of Content Item Block - - "title" (string) (default: ''): Title of Content Item Block - - "items" (array) (default: []): Content Item's for the Content Item Block - - "button" (associative array) (default: {}): Predefined structure compatible with Link component. - - "extra_classes" (string) (default: '') - - "extra_attributes" (array) (default: []): format: [ - { - "name" (string) (default: ''), - "value" (string) (default: '') - }, - ... - ] +/** + * @file + * Theme implementation for a ECL Content Item Block. + */ +Parameters: + - "type" (string) (default: 'one'): Type of Content Item Block + - "title" (string) (default: ''): Title of Content Item Block + - "introduction" (string) (default: ''): A brief summary of the block. + - "items" (array) (default: []): Content Item's for the Content Item Block + - "button" (associative array) (default: {}): Predefined structure compatible with Link component. + - "extra_classes" (string) (default: '') + - "extra_attributes" (array) (default: []): format: [ + { + "name" (string) (default: ''), + "value" (string) (default: '') + }, + ... + ] #} {# Internal properties #} @@ -26,6 +27,7 @@ {% set _extra_attributes = '' %} {% set _type = type|default('one') %} {% set _title = title|default('') %} +{% set _introduction = introduction|default('') %} {% set _items = items|default([]) %} {% set _button = button|default({}) %} @@ -61,6 +63,14 @@ {% endif %} + {% if _introduction %} +
Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed cursus turpis vitae tortor. Aliquam eu nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce egestas elit eget lorem.
" highlighted_item: type: "array" label: "Highlighted item" diff --git a/templates/patterns/highlighted_list/pattern-highlighted-list--variant-four-columns.html.twig b/templates/patterns/highlighted_list/pattern-highlighted-list--variant-four-columns.html.twig index 568965170..29bd1fb8e 100644 --- a/templates/patterns/highlighted_list/pattern-highlighted-list--variant-four-columns.html.twig +++ b/templates/patterns/highlighted_list/pattern-highlighted-list--variant-four-columns.html.twig @@ -53,6 +53,7 @@ {% include '@oe_theme/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig' with { 'columns': 4, 'title': title|default(''), + 'introduction': introduction|default(''), 'items': _items, 'see_more': _see_more, 'detail': detail|default(''), diff --git a/templates/patterns/highlighted_list/pattern-highlighted-list.html.twig b/templates/patterns/highlighted_list/pattern-highlighted-list.html.twig index c527c2aae..1fa48a269 100644 --- a/templates/patterns/highlighted_list/pattern-highlighted-list.html.twig +++ b/templates/patterns/highlighted_list/pattern-highlighted-list.html.twig @@ -70,6 +70,7 @@ {% include '@oe_theme/compositions/ec-component-highlighted-news-block/highlighted-news-block.html.twig' with { 'title': title|default(''), + 'introduction': introduction|default(''), 'highlighted': _highlighted_item|default([]), 'items': _items, 'see_more': _see_more, diff --git a/templates/patterns/list_item_blocks/list_item_block_four_columns.ui_patterns.yml b/templates/patterns/list_item_blocks/list_item_block_four_columns.ui_patterns.yml index 7e87772d5..f479292b5 100644 --- a/templates/patterns/list_item_blocks/list_item_block_four_columns.ui_patterns.yml +++ b/templates/patterns/list_item_blocks/list_item_block_four_columns.ui_patterns.yml @@ -7,6 +7,12 @@ list_item_block_four_columns: label: "Title" description: "Block title" preview: "The European Commission's priorities" + introduction: + type: "text" + label: "Introduction" + description: "A brief summary of the content on the list." + preview: + '#markup': "The European Commission focuses on several key areas: supporting the EU economy and businesses, and providing guidance on living, working and traveling in the EU. Read more about our priorities.
" items: type: "array" label: "Layout items" diff --git a/templates/patterns/list_item_blocks/list_item_block_one_column.ui_patterns.yml b/templates/patterns/list_item_blocks/list_item_block_one_column.ui_patterns.yml index 6c69b359c..0075a077b 100644 --- a/templates/patterns/list_item_blocks/list_item_block_one_column.ui_patterns.yml +++ b/templates/patterns/list_item_blocks/list_item_block_one_column.ui_patterns.yml @@ -7,6 +7,12 @@ list_item_block_one_column: label: "Title" description: "Block title" preview: "The European Commission's priorities" + introduction: + type: "text" + label: "Introduction" + description: "A brief summary of the content on the list." + preview: + '#markup': "The European Commission focuses on several key areas: supporting the EU economy and businesses, and providing guidance on living, working and traveling in the EU. Read more about our priorities.
" items: type: "array" label: "Layout items" diff --git a/templates/patterns/list_item_blocks/list_item_block_six_columns.ui_patterns.yml b/templates/patterns/list_item_blocks/list_item_block_six_columns.ui_patterns.yml index 3c7e6c311..3b9649a07 100644 --- a/templates/patterns/list_item_blocks/list_item_block_six_columns.ui_patterns.yml +++ b/templates/patterns/list_item_blocks/list_item_block_six_columns.ui_patterns.yml @@ -7,6 +7,12 @@ list_item_block_six_columns: label: "Title" description: "Block title" preview: "The European Commission's priorities" + introduction: + type: "text" + label: "Introduction" + description: "A brief summary of the content on the list." + preview: + '#markup': "The European Commission focuses on several key areas: supporting the EU economy and businesses, and providing guidance on living, working and traveling in the EU. Read more about our priorities.
" items: type: "array" label: "Layout items" diff --git a/templates/patterns/list_item_blocks/list_item_block_three_columns.ui_patterns.yml b/templates/patterns/list_item_blocks/list_item_block_three_columns.ui_patterns.yml index e26c699ed..6a83f5964 100644 --- a/templates/patterns/list_item_blocks/list_item_block_three_columns.ui_patterns.yml +++ b/templates/patterns/list_item_blocks/list_item_block_three_columns.ui_patterns.yml @@ -7,6 +7,12 @@ list_item_block_three_columns: label: "Title" description: "Block title" preview: "The European Commission's priorities" + introduction: + type: "text" + label: "Introduction" + description: "A brief summary of the content on the list." + preview: + '#markup': "The European Commission focuses on several key areas: supporting the EU economy and businesses, and providing guidance on living, working and traveling in the EU. Read more about our priorities.
" items: type: "array" label: "Layout items" diff --git a/templates/patterns/list_item_blocks/list_item_block_two_columns.ui_patterns.yml b/templates/patterns/list_item_blocks/list_item_block_two_columns.ui_patterns.yml index a549900fc..bb22b3b6a 100644 --- a/templates/patterns/list_item_blocks/list_item_block_two_columns.ui_patterns.yml +++ b/templates/patterns/list_item_blocks/list_item_block_two_columns.ui_patterns.yml @@ -7,6 +7,12 @@ list_item_block_two_columns: label: "Title" description: "Block title" preview: "The European Commission's priorities" + introduction: + type: "text" + label: "Introduction" + description: "A brief summary of the content on the list." + preview: + '#markup': "The European Commission focuses on several key areas: supporting the EU economy and businesses, and providing guidance on living, working and traveling in the EU. Read more about our priorities.
" items: type: "array" label: "Layout items" diff --git a/templates/patterns/list_item_blocks/pattern-list-item-block-four-columns.html.twig b/templates/patterns/list_item_blocks/pattern-list-item-block-four-columns.html.twig index 48566501e..60d0b6af2 100644 --- a/templates/patterns/list_item_blocks/pattern-list-item-block-four-columns.html.twig +++ b/templates/patterns/list_item_blocks/pattern-list-item-block-four-columns.html.twig @@ -13,6 +13,7 @@ {% include '@oe_theme/compositions/ec-component-content-item-block/content-item-block.html.twig' with { type: 4, title: title, + introduction: introduction, items: items, icon_path: ecl_icon_path, button: { diff --git a/templates/patterns/list_item_blocks/pattern-list-item-block-one-column.html.twig b/templates/patterns/list_item_blocks/pattern-list-item-block-one-column.html.twig index 78a333f0a..00758e78e 100644 --- a/templates/patterns/list_item_blocks/pattern-list-item-block-one-column.html.twig +++ b/templates/patterns/list_item_blocks/pattern-list-item-block-one-column.html.twig @@ -13,6 +13,7 @@ {% include '@oe_theme/compositions/ec-component-content-item-block/content-item-block.html.twig' with { type: 1, title: title, + introduction: introduction, items: items, icon_path: ecl_icon_path, button: { diff --git a/templates/patterns/list_item_blocks/pattern-list-item-block-six-columns.html.twig b/templates/patterns/list_item_blocks/pattern-list-item-block-six-columns.html.twig index 2a6edad4d..5f16ed396 100644 --- a/templates/patterns/list_item_blocks/pattern-list-item-block-six-columns.html.twig +++ b/templates/patterns/list_item_blocks/pattern-list-item-block-six-columns.html.twig @@ -13,6 +13,7 @@ {% include '@oe_theme/compositions/ec-component-content-item-block/content-item-block.html.twig' with { type: 6, title: title, + introduction: introduction, items: items, icon_path: ecl_icon_path, button: { diff --git a/templates/patterns/list_item_blocks/pattern-list-item-block-three-columns.html.twig b/templates/patterns/list_item_blocks/pattern-list-item-block-three-columns.html.twig index f4862a687..245773453 100644 --- a/templates/patterns/list_item_blocks/pattern-list-item-block-three-columns.html.twig +++ b/templates/patterns/list_item_blocks/pattern-list-item-block-three-columns.html.twig @@ -13,6 +13,7 @@ {% include '@oe_theme/compositions/ec-component-content-item-block/content-item-block.html.twig' with { type: 3, title: title, + introduction: introduction, items: items, icon_path: ecl_icon_path, button: { diff --git a/templates/patterns/list_item_blocks/pattern-list-item-block-two-columns.html.twig b/templates/patterns/list_item_blocks/pattern-list-item-block-two-columns.html.twig index 68686b1be..50f3f021e 100644 --- a/templates/patterns/list_item_blocks/pattern-list-item-block-two-columns.html.twig +++ b/templates/patterns/list_item_blocks/pattern-list-item-block-two-columns.html.twig @@ -13,6 +13,7 @@ {% include '@oe_theme/compositions/ec-component-content-item-block/content-item-block.html.twig' with { type: 2, title: title, + introduction: introduction, items: items, icon_path: ecl_icon_path, button: { diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 9e814f209..c088d6f7c 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -1383,6 +1383,8 @@ '#id': list_item_block_one_column '#fields': title: "Block title" + introduction: + '#markup': 'The Introduction to the list
' items: - '#type': "pattern" '#id': "list_item" @@ -1393,6 +1395,7 @@ assertions: count: 'div.ecl-content-item-block__title': 1 + 'div.ecl-content-item-block__introduction': 1 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 1 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 @@ -1405,6 +1408,7 @@ 'div.ecl-content-item-block__button a.ecl-link--icon.ecl-link--standalone svg': 0 equals: 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': "Block title" + 'div.ecl-content-item-block__introduction': "The Introduction to the list
" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-item__content-block div.ecl-content-block__title': "Business, Economy, Euro" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-block__description': "EU economy, the euro, and practical information for EU businesses and entrepreneurs." 'div.ecl-content-item-block__button .ecl-u-clearfix': "Button nolink" @@ -1427,6 +1431,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 'div.ecl-content-item-block__item.ecl-col-m-6': 0 @@ -1460,6 +1465,7 @@ count: 'div.ecl-content-item-block__title': 1 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 1 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 'div.ecl-content-item-block__item.ecl-col-m-6': 0 @@ -1490,6 +1496,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 'div.ecl-content-item-block__item.ecl-col-m-6': 0 @@ -1520,6 +1527,7 @@ count: 'div.ecl-content-item-block__title': 1 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 1 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 'div.ecl-content-item-block__item.ecl-col-m-6': 0 @@ -1553,6 +1561,7 @@ count: 'div.ecl-content-item-block__title': 1 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 1 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 1 'div.ecl-content-item-block__item.ecl-col-12': 1 'div.ecl-content-item-block__item.ecl-col-m-6': 0 @@ -1586,6 +1595,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 2 'div.ecl-content-item-block__item.ecl-col-l-6': 2 'div.ecl-content-item-block__item.ecl-col-l-4': 0 @@ -1602,6 +1612,8 @@ '#type': pattern '#id': list_item_block_two_columns '#fields': + introduction: + '#markup': 'The Introduction to the list
' items: - '#type': "pattern" '#id': "list_item" @@ -1620,6 +1632,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 1 'div.ecl-content-item-block__item': 2 'div.ecl-content-item-block__item.ecl-col-l-6': 2 'div.ecl-content-item-block__item.ecl-col-l-4': 0 @@ -1628,6 +1641,7 @@ 'div.ecl-content-item-block__button': 1 'div.ecl-content-item-block__button a.ecl-link.ecl-link--standalone.ecl-link--icon[href="http://example.com"]': 1 equals: + 'div.ecl-content-item-block__introduction': "The Introduction to the list
" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-item__content-block div.ecl-content-block__title': "List item 1" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-block__description': "Description for list item 1." 'div.ecl-content-item-block__item:nth-child(2) article.ecl-content-item div.ecl-content-item__content-block div.ecl-content-block__title': "List item 2" @@ -1668,6 +1682,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 0 'div.ecl-content-item-block__item': 8 'div.ecl-content-item-block__item.ecl-col-l-6': 0 'div.ecl-content-item-block__item.ecl-u-mb-l.ecl-col-12.ecl-col-l-4': 3 @@ -1691,6 +1706,8 @@ '#type': pattern '#id': list_item_block_three_columns '#fields': + introduction: + '#markup': 'The Introduction to the list
' items: - '#type': "pattern" '#id': "list_item" @@ -1724,6 +1741,7 @@ count: 'div.ecl-content-item-block__title': 0 'div.ecl-content-item-block__title h2.ecl-u-type-heading-2': 0 + 'div.ecl-content-item-block__introduction': 1 'div.ecl-content-item-block__item': 5 'div.ecl-content-item-block__item.ecl-col-l-6': 0 'div.ecl-content-item-block__item.ecl-col-l-4': 5 @@ -1732,6 +1750,7 @@ 'div.ecl-content-item-block__button': 1 'div.ecl-content-item-block__button a.ecl-link.ecl-link--standalone.ecl-link--icon[href="http://example.com"]': 1 equals: + 'div.ecl-content-item-block__introduction': "The Introduction to the list
" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-item__content-block div.ecl-content-block__title': "List item 1" 'div.ecl-content-item-block__item:nth-child(1) article.ecl-content-item div.ecl-content-block__description': "Description for list item 1." 'div.ecl-content-item-block__item:nth-child(2) article.ecl-content-item div.ecl-content-item__content-block div.ecl-content-block__title': "List item 2" @@ -1747,6 +1766,8 @@ '#type': pattern '#id': list_item_block_four_columns '#fields': + introduction: + '#markup': 'The Introduction to the list
' items: - { '#type': 'pattern', '#id': 'link', '#fields': { url: '#', text: 'A simple link 1' } } - { '#type': 'pattern', '#id': 'link', '#fields': { url: '#', text: 'A simple link 2' } } @@ -1758,6 +1779,7 @@ button_icon_position: "before" assertions: equals: + 'div.ecl-content-item-block__introduction': "The Introduction to the list
" 'div.ecl-content-item-block__item.ecl-col-l-3:nth-child(1) a.ecl-link': 'A simple link 1' 'div.ecl-content-item-block__item.ecl-col-l-3:nth-child(2) a.ecl-link': 'A simple link 2' 'div.ecl-content-item-block__item.ecl-col-l-3:nth-child(3) a.ecl-link': 'A simple link 3' @@ -1767,6 +1789,8 @@ '#type': pattern '#id': list_item_block_six_columns '#fields': + introduction: + '#markup': 'The Introduction to the list
' items: - { '#type': 'pattern', '#id': 'link', '#fields': { url: '#', text: 'A simple link 1' } } - { '#type': 'pattern', '#id': 'link', '#fields': { url: '#', text: 'A simple link 2' } } @@ -1780,6 +1804,7 @@ button_icon_position: "before" assertions: equals: + 'div.ecl-content-item-block__introduction': "The Introduction to the list
" 'div.ecl-content-item-block__item.ecl-col-l-2:nth-child(1) a.ecl-link': 'A simple link 1' 'div.ecl-content-item-block__item.ecl-col-l-2:nth-child(2) a.ecl-link': 'A simple link 2' 'div.ecl-content-item-block__item.ecl-col-l-2:nth-child(3) a.ecl-link': 'A simple link 3' @@ -3845,6 +3870,8 @@ '#variant': default '#fields': title: "Highlighted News" + introduction: + '#markup': 'The Introduction to the list
' highlighted_item: title: "Item 1" url: "#" @@ -3917,7 +3944,8 @@ count: 'div#highlighted-news-block': 1 'div#highlighted-news-block h2.ecl-u-type-heading-2': 1 - 'div div.ecl-row': 2 + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 1 + 'div div.ecl-row': 3 'div.ecl-row div.ecl-col-l-8.ecl-u-d-flex.ecl-u-flex-column': 1 'div.ecl-row div.ecl-col-l-4.ecl-u-d-flex.ecl-u-flex-column': 1 'div.ecl-row article.ecl-content-item--divider.ecl-u-flex-grow-1': 4 @@ -3937,6 +3965,7 @@ 'div#highlighted-news-block div.ecl.ecl-u-mt-s': 1 equals: 'div#highlighted-news-block h2.ecl-u-type-heading-2': 'Highlighted News' + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 'The Introduction to the list
' 'div.ecl-col-l-8 ul.ecl-content-block__primary-meta-container li.ecl-content-block__primary-meta-item:nth-child(1)': 'Item 1 primary meta' 'div.ecl-col-l-8 ul.ecl-content-block__primary-meta-container li.ecl-content-block__primary-meta-item:nth-child(2)': 'DD Month Year' 'div.ecl-col-l-8 .ecl-content-block__title a.ecl-link.ecl-link--standalone[href="#"] .ecl-link__label': 'Item 1' @@ -4019,6 +4048,7 @@ count: 'div#highlighted-news-block': 1 'div#highlighted-news-block h2.ecl-u-type-heading-2': 0 + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 0 'div div.ecl-row': 1 'div.ecl-row div.ecl-col-l-8.ecl-u-d-flex.ecl-u-flex-column': 1 'div.ecl-row div.ecl-col-l-4.ecl-u-d-flex.ecl-u-flex-column': 1 @@ -4056,6 +4086,8 @@ '#variant': four_columns '#fields': title: "Highlighted News" + introduction: + '#markup': 'The Introduction to the list
' highlighted_item: title: "Item 1" url: "#" @@ -4149,7 +4181,8 @@ count: 'div#highlighted-news-block': 1 'div#highlighted-news-block h2.ecl-u-type-heading-2': 1 - 'div div.ecl-row': 2 + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 1 + 'div div.ecl-row': 3 'div div.ecl-row.ecl-u-border-color-neutral.ecl-u-border-width-1.ecl-u-border-bottom.ecl-u-pb-l': 1 'div.ecl-row div.ecl-col-l-3.ecl-u-d-flex.ecl-u-flex-column': 4 'div.ecl-row article.ecl-content-item.ecl-u-flex-grow-1': 6 @@ -4167,6 +4200,7 @@ 'div#highlighted-news-block div.ecl.ecl-u-mt-s': 1 equals: 'div#highlighted-news-block h2.ecl-u-type-heading-2': 'Highlighted News' + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 'The Introduction to the list
' 'div.ecl-col-l-3:nth-child(1) ul.ecl-content-block__primary-meta-container li.ecl-content-block__primary-meta-item:nth-child(1)': 'Item 2 primary meta' 'div.ecl-col-l-3:nth-child(1) ul.ecl-content-block__primary-meta-container li.ecl-content-block__primary-meta-item:nth-child(2)': 'DD Month Year' 'div.ecl-col-l-3:nth-child(1) .ecl-content-block__title': 'Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem' @@ -4251,6 +4285,7 @@ count: 'div#highlighted-news-block': 1 'div#highlighted-news-block h2.ecl-u-type-heading-2': 1 + 'div#highlighted-news-block div.ecl-content-item-block__introduction': 0 'div div.ecl-row.ecl-u-border-color-neutral.ecl-u-border-width-1.ecl-u-border-bottom.ecl-u-pb-l': 1 'div.ecl-row div.ecl-col-l-3.ecl-u-d-flex.ecl-u-flex-column': 2 'div.ecl-row article.ecl-content-item.ecl-u-flex-grow-1': 3 diff --git a/tests/src/PatternAssertions/HighlightedListAssert.php b/tests/src/PatternAssertions/HighlightedListAssert.php index 878fb9f6c..007076d1f 100644 --- a/tests/src/PatternAssertions/HighlightedListAssert.php +++ b/tests/src/PatternAssertions/HighlightedListAssert.php @@ -22,6 +22,10 @@ protected function getAssertions($variant): array { [$this, 'assertElementText'], 'div#highlighted-news-block h2.ecl-u-type-heading-2', ], + 'introduction' => [ + [$this, 'assertElementText'], + 'div#highlighted-news-block div.ecl-content-item-block__introduction', + ], 'highlighted_item' => [ [$this, 'assertHighlightedItem'], 'div#highlighted-news-block div.ecl-row div.ecl-col-l-8.ecl-u-d-flex.ecl-u-flex-column',