From fc21c9681951622fd206acd51aa353a40fcad94e Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Mon, 8 Jul 2024 10:41:07 +0300 Subject: [PATCH 1/3] EWPP-4509: Update to ECL 4.3.0. --- package.json | 100 +++++++++--------- ...+twig-component-content-block+4.3.0.patch} | 0 ...h => @ecl+twig-component-file+4.3.0.patch} | 0 ...cl+twig-component-site-footer+4.3.0.patch} | 0 ...h => @ecl+twig-component-tabs+4.3.0.patch} | 0 5 files changed, 50 insertions(+), 50 deletions(-) rename patches/{@ecl+twig-component-content-block+4.2.3.patch => @ecl+twig-component-content-block+4.3.0.patch} (100%) rename patches/{@ecl+twig-component-file+4.2.3.patch => @ecl+twig-component-file+4.3.0.patch} (100%) rename patches/{@ecl+twig-component-site-footer+4.2.3.patch => @ecl+twig-component-site-footer+4.3.0.patch} (100%) rename patches/{@ecl+twig-component-tabs+4.2.3.patch => @ecl+twig-component-tabs+4.3.0.patch} (100%) diff --git a/package.json b/package.json index a490fb457..35efa404f 100644 --- a/package.json +++ b/package.json @@ -14,57 +14,57 @@ "prepare": "patch-package" }, "dependencies": { - "@ecl/builder": "4.2.3", - "@ecl/preset-ec": "4.2.3", - "@ecl/preset-eu": "4.2.3", - "@ecl/preset-reset": "4.2.3", + "@ecl/builder": "4.3.0", + "@ecl/preset-ec": "4.3.0", + "@ecl/preset-eu": "4.3.0", + "@ecl/preset-reset": "4.3.0", "@ecl/stylelint-config": "0.2.1", - "@ecl/theme-ec": "4.2.3", - "@ecl/theme-eu": "4.2.3", - "@ecl/twig-component-accordion": "4.2.3", - "@ecl/twig-component-banner": "4.2.3", - "@ecl/twig-component-blockquote": "4.2.3", - "@ecl/twig-component-breadcrumb": "4.2.3", - "@ecl/twig-component-button": "4.2.3", - "@ecl/twig-component-card": "4.2.3", - "@ecl/twig-component-carousel": "4.2.3", - "@ecl/twig-component-content-item": "4.2.3", - "@ecl/twig-component-datepicker": "4.2.3", - "@ecl/twig-component-description-list": "4.2.3", - "@ecl/twig-component-expandable": "4.2.3", - "@ecl/twig-component-fact-figures": "4.2.3", - "@ecl/twig-component-featured-item": "4.2.3", - "@ecl/twig-component-file": "4.2.3", - "@ecl/twig-component-gallery": "4.2.3", - "@ecl/twig-component-icon": "4.2.3", - "@ecl/twig-component-inpage-navigation": "4.2.3", - "@ecl/twig-component-label": "4.2.3", - "@ecl/twig-component-link": "4.2.3", - "@ecl/twig-component-list-illustration": "4.2.3", - "@ecl/twig-component-media-container": "4.2.3", - "@ecl/twig-component-mega-menu": "4.2.3", - "@ecl/twig-component-menu": "4.2.3", - "@ecl/twig-component-navigation-list": "4.2.3", - "@ecl/twig-component-news-ticker": "4.2.3", - "@ecl/twig-component-notification": "4.2.3", - "@ecl/twig-component-page-header": "4.2.3", - "@ecl/twig-component-pagination": "4.2.3", - "@ecl/twig-component-radio": "4.2.3", - "@ecl/twig-component-search-form": "4.2.3", - "@ecl/twig-component-select": "4.2.3", - "@ecl/twig-component-site-footer": "4.2.3", - "@ecl/twig-component-site-header": "4.2.3", - "@ecl/twig-component-skip-link": "4.2.3", - "@ecl/twig-component-social-media-follow": "4.2.3", - "@ecl/twig-component-social-media-share": "4.2.3", - "@ecl/twig-component-splash-page": "4.2.3", - "@ecl/twig-component-table": "4.2.3", - "@ecl/twig-component-tabs": "4.2.3", - "@ecl/twig-component-tag": "4.2.3", - "@ecl/twig-component-text-input": "4.2.3", - "@ecl/twig-component-timeline": "4.2.3", - "@ecl/vanilla-utility-background": "4.2.3", - "@ecl/vanilla-utility-border": "4.2.3", + "@ecl/theme-ec": "4.3.0", + "@ecl/theme-eu": "4.3.0", + "@ecl/twig-component-accordion": "4.3.0", + "@ecl/twig-component-banner": "4.3.0", + "@ecl/twig-component-blockquote": "4.3.0", + "@ecl/twig-component-breadcrumb": "4.3.0", + "@ecl/twig-component-button": "4.3.0", + "@ecl/twig-component-card": "4.3.0", + "@ecl/twig-component-carousel": "4.3.0", + "@ecl/twig-component-content-item": "4.3.0", + "@ecl/twig-component-datepicker": "4.3.0", + "@ecl/twig-component-description-list": "4.3.0", + "@ecl/twig-component-expandable": "4.3.0", + "@ecl/twig-component-fact-figures": "4.3.0", + "@ecl/twig-component-featured-item": "4.3.0", + "@ecl/twig-component-file": "4.3.0", + "@ecl/twig-component-gallery": "4.3.0", + "@ecl/twig-component-icon": "4.3.0", + "@ecl/twig-component-inpage-navigation": "4.3.0", + "@ecl/twig-component-label": "4.3.0", + "@ecl/twig-component-link": "4.3.0", + "@ecl/twig-component-list-illustration": "4.3.0", + "@ecl/twig-component-media-container": "4.3.0", + "@ecl/twig-component-mega-menu": "4.3.0", + "@ecl/twig-component-menu": "4.3.0", + "@ecl/twig-component-navigation-list": "4.3.0", + "@ecl/twig-component-news-ticker": "4.3.0", + "@ecl/twig-component-notification": "4.3.0", + "@ecl/twig-component-page-header": "4.3.0", + "@ecl/twig-component-pagination": "4.3.0", + "@ecl/twig-component-radio": "4.3.0", + "@ecl/twig-component-search-form": "4.3.0", + "@ecl/twig-component-select": "4.3.0", + "@ecl/twig-component-site-footer": "4.3.0", + "@ecl/twig-component-site-header": "4.3.0", + "@ecl/twig-component-skip-link": "4.3.0", + "@ecl/twig-component-social-media-follow": "4.3.0", + "@ecl/twig-component-social-media-share": "4.3.0", + "@ecl/twig-component-splash-page": "4.3.0", + "@ecl/twig-component-table": "4.3.0", + "@ecl/twig-component-tabs": "4.3.0", + "@ecl/twig-component-tag": "4.3.0", + "@ecl/twig-component-text-input": "4.3.0", + "@ecl/twig-component-timeline": "4.3.0", + "@ecl/vanilla-utility-background": "4.3.0", + "@ecl/vanilla-utility-border": "4.3.0", "chokidar-cli": "3.0.0", "grunt": "1.6.1", "grunt-contrib-copy": "1.0.0", diff --git a/patches/@ecl+twig-component-content-block+4.2.3.patch b/patches/@ecl+twig-component-content-block+4.3.0.patch similarity index 100% rename from patches/@ecl+twig-component-content-block+4.2.3.patch rename to patches/@ecl+twig-component-content-block+4.3.0.patch diff --git a/patches/@ecl+twig-component-file+4.2.3.patch b/patches/@ecl+twig-component-file+4.3.0.patch similarity index 100% rename from patches/@ecl+twig-component-file+4.2.3.patch rename to patches/@ecl+twig-component-file+4.3.0.patch diff --git a/patches/@ecl+twig-component-site-footer+4.2.3.patch b/patches/@ecl+twig-component-site-footer+4.3.0.patch similarity index 100% rename from patches/@ecl+twig-component-site-footer+4.2.3.patch rename to patches/@ecl+twig-component-site-footer+4.3.0.patch diff --git a/patches/@ecl+twig-component-tabs+4.2.3.patch b/patches/@ecl+twig-component-tabs+4.3.0.patch similarity index 100% rename from patches/@ecl+twig-component-tabs+4.2.3.patch rename to patches/@ecl+twig-component-tabs+4.3.0.patch From ae510d2a4b24481d155b426b8606ecaca1d6817f Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Mon, 8 Jul 2024 14:57:56 +0300 Subject: [PATCH 2/3] EWPP-4509: Add news ticker default icon and adapt selectors in assertions. --- .../news_ticker/pattern-news-ticker.html.twig | 4 ++++ tests/src/Kernel/fixtures/rendering.yml | 22 +++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/templates/patterns/news_ticker/pattern-news-ticker.html.twig b/templates/patterns/news_ticker/pattern-news-ticker.html.twig index d35719ff6..2f12f6699 100644 --- a/templates/patterns/news_ticker/pattern-news-ticker.html.twig +++ b/templates/patterns/news_ticker/pattern-news-ticker.html.twig @@ -10,6 +10,10 @@ content: _item.content, link: _item.link, external: _item.external_link|default(false), + icon: { + path: ecl_icon_path, + name: 'information', + } }]) %} {% endfor %} diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 38b48c6a6..7f82a304c 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -467,7 +467,7 @@ 'a.ecl-file__translation-download[hreflang="it"]': 1 'a.ecl-file__translation-download[hreflang="hu"]': 1 'a.ecl-file__translation-download[hreflang="pt"]': 1 - '.ecl-file__info .ecl-file__detail-meta span.ecl-file__detail-meta-item': 1 + '.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item': 1 equals: 'div.ecl-file__title': "File title example" 'div.ecl-file__language': "English" @@ -483,7 +483,7 @@ '.ecl-file__translation-item:nth-child(4) div.ecl-file__translation-title': "português" '.ecl-file__translation-item:nth-child(4) div.ecl-file__translation-meta': "(175.78 KB - DOC)" '.ecl-file__translation-description': "Custom information snippet." - '.ecl-file__info .ecl-file__detail-meta span.ecl-file__detail-meta-item:nth-child(1)': '31 AUGUST 2020' + '.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item:nth-child(1)': '31 AUGUST 2020' - array: '#type': pattern '#id': file_translation @@ -511,7 +511,7 @@ 'div.ecl-file__translation-container': 1 'li.ecl-file__translation-item a.ecl-file__translation-download': 1 'a.ecl-file__translation-download[href="http://example.com/document_fr.xls"]': 1 - '.ecl-file__info .ecl-file__detail-meta span.ecl-file__detail-meta-item': 0 + '.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item': 0 equals: 'div.ecl-file__title': "File title example" 'div.ecl-file__language': "English" @@ -583,7 +583,7 @@ 'img.ecl-file__image[alt="thumbnail alt"]': 1 'a.ecl-file__download[href="http://example.com"]': 1 'div.ecl-file.ecl-file--thumbnail': 1 - 'div.ecl-file__container div.ecl-file__info div.ecl-file__detail-meta': 1 + 'div.ecl-file__container div.ecl-file__info ul.ecl-file__detail-meta': 1 'div.ecl-file__container div.ecl-file__info': 1 'div.ecl-file__translation-container': 1 'ul.ecl-file__translation-list': 1 @@ -596,8 +596,8 @@ equals: 'div.ecl-file__info div.ecl-file__title': "Example document" 'div.ecl-file__info div.ecl-file__description': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer quis lorem tellus. Nullam sollicitudin suscipit diam, ac blandit ipsum tempor consectetur. Duis vitae pulvinar turpis. Donec maximus pharetra ex a ultricies.' - 'div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item:nth-child(1)': 'RESOURCE TYPE' - 'div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item:nth-child(2)': '2020-31-08' + 'div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item:nth-child(1)': 'RESOURCE TYPE' + 'div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item:nth-child(2)': '2020-31-08' 'div.ecl-file__footer div.ecl-file__language': "English" 'div.ecl-file__footer div.ecl-file__meta': "(136.72 KB - PDF)" 'div.ecl-file__footer a.ecl-file__download .ecl-link__label': "Download" @@ -677,7 +677,7 @@ 'img.ecl-file__image[alt="thumbnail alt"]': 1 'a.ecl-file__download[href="http://example.com"]': 1 'div.ecl-file.ecl-file--thumbnail': 1 - 'div.ecl-file__container div.ecl-file__info div.ecl-file__detail-meta': 1 + 'div.ecl-file__container div.ecl-file__info ul.ecl-file__detail-meta': 1 'div.ecl-file__container div.ecl-file__info': 1 'div.ecl-file__translation-container': 1 'ul.ecl-file__translation-list': 1 @@ -694,8 +694,8 @@ equals: 'div.ecl-file__info div.ecl-file__title': "Example document" 'div.ecl-file__info div.ecl-file__description': 'Lorem...' - 'div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item:nth-child(1)': 'RESOURCE TYPE' - 'div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item:nth-child(2)': '2020-31-08' + 'div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item:nth-child(1)': 'RESOURCE TYPE' + 'div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item:nth-child(2)': '2020-31-08' 'div.ecl-file__footer div.ecl-file__language': "English" 'div.ecl-file__footer div.ecl-file__meta': "(136.72 KB - PDF)" 'div.ecl-file__footer a.ecl-file__download .ecl-link__label': "Download" @@ -3652,7 +3652,7 @@ equals: li.ecl-news-ticker__slide:nth-child(1) a svg.ecl-link__icon: 'External link' li.ecl-news-ticker__slide:nth-child(5) a svg.ecl-link__icon: 'External link' - svg.ecl-icon.ecl-icon--m.ecl-news-ticker__icon: '' + svg.ecl-icon.ecl-icon--l.ecl-news-ticker__icon: '' div.ecl-news-ticker__counter span.ecl-news-ticker__counter--current: '1' div.ecl-news-ticker__counter span.ecl-news-ticker__counter--max: '6' button.ecl-news-ticker__prev span.ecl-button__label: 'Previous news item' @@ -3686,7 +3686,7 @@ li.ecl-news-ticker__slide:nth-child(3) a.ecl-link.ecl-news-ticker__slide-text: "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur" div.ecl-news-ticker__counter: '1 in' equals: - svg.ecl-icon.ecl-icon--m.ecl-news-ticker__icon: '' + svg.ecl-icon.ecl-icon--l.ecl-news-ticker__icon: '' div.ecl-news-ticker__counter span.ecl-news-ticker__counter--max: '3' - array: '#type': 'pattern' From cd3c952835d5c4339a4bb60cb91c423890319d4c Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Tue, 9 Jul 2024 18:11:09 +0300 Subject: [PATCH 3/3] EWPP-4509: Update FileTeassertAssert selectors. --- tests/src/PatternAssertions/FileTeaserAssert.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/PatternAssertions/FileTeaserAssert.php b/tests/src/PatternAssertions/FileTeaserAssert.php index f1b6e1c90..ea4c10c0d 100644 --- a/tests/src/PatternAssertions/FileTeaserAssert.php +++ b/tests/src/PatternAssertions/FileTeaserAssert.php @@ -47,13 +47,13 @@ protected function getAssertions($variant): array { */ protected function assertMeta($expected_metas, Crawler $crawler): void { if (is_null($expected_metas)) { - $this->assertElementNotExists('div.ecl-file--thumbnail div.ecl-file__container div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item', $crawler); + $this->assertElementNotExists('div.ecl-file--thumbnail div.ecl-file__container div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item', $crawler); return; } if (!is_array($expected_metas)) { $expected_metas = [$expected_metas]; } - $meta_items = $crawler->filter('div.ecl-file--thumbnail div.ecl-file__container div.ecl-file__info div.ecl-file__detail-meta span.ecl-file__detail-meta-item'); + $meta_items = $crawler->filter('div.ecl-file--thumbnail div.ecl-file__container div.ecl-file__info ul.ecl-file__detail-meta li.ecl-file__detail-meta-item'); self::assertCount(count($expected_metas), $meta_items, 'The expected meta item number does not correspond with the found meta item number.'); foreach ($expected_metas as $index => $expected_meta) { self::assertEquals($expected_meta, trim($meta_items->eq($index)->text()), \sprintf('The expected text of the meta number %s does not correspond to the found meta text.', $index));