Skip to content

Commit

Permalink
Merge pull request #1474 from openeuropa/EWPP-4509
Browse files Browse the repository at this point in the history
EWPP-4509: Update to ECL 4.3.0.
  • Loading branch information
upchuk authored Jul 22, 2024
2 parents f496919 + cd3c952 commit cc593d0
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 63 deletions.
100 changes: 50 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions templates/patterns/news_ticker/pattern-news-ticker.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
content: _item.content,
link: _item.link,
external: _item.external_link|default(false),
icon: {
path: ecl_icon_path,
name: 'information',
}
}]) %}
{% endfor %}

Expand Down
22 changes: 11 additions & 11 deletions tests/src/Kernel/fixtures/rendering.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -3652,7 +3652,7 @@
equals:
li.ecl-news-ticker__slide:nth-child(1) a svg.ecl-link__icon: '<title>External link</title><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#external"></use>'
li.ecl-news-ticker__slide:nth-child(5) a svg.ecl-link__icon: '<title>External link</title><use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#external"></use>'
svg.ecl-icon.ecl-icon--m.ecl-news-ticker__icon: '<use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#information"></use>'
svg.ecl-icon.ecl-icon--l.ecl-news-ticker__icon: '<use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#information"></use>'
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'
Expand Down Expand Up @@ -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: '<span class="ecl-news-ticker__counter--current">1</span> in'
equals:
svg.ecl-icon.ecl-icon--m.ecl-news-ticker__icon: '<use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#information"></use>'
svg.ecl-icon.ecl-icon--l.ecl-news-ticker__icon: '<use xlink:href="/themes/custom/oe_theme/dist/ec/images/icons/sprites/icons.svg#information"></use>'
div.ecl-news-ticker__counter span.ecl-news-ticker__counter--max: '3'
- array:
'#type': 'pattern'
Expand Down
4 changes: 2 additions & 2 deletions tests/src/PatternAssertions/FileTeaserAssert.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit cc593d0

Please sign in to comment.