Skip to content

Commit

Permalink
Merge pull request #1040 from openeuropa/EWPP-1997
Browse files Browse the repository at this point in the history
EWPP-1997: Upgrade to ECL 3.2.3.
  • Loading branch information
22Alexandra authored Feb 23, 2022
2 parents 01b6a8c + 91033a6 commit f0527aa
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 70 deletions.
2 changes: 1 addition & 1 deletion oe_theme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ function oe_theme_preprocess_block__system_branding_block(&$variables) {
else {
// Check whether ECL provides a logo for the language.
$ecl_logo = DRUPAL_ROOT . '/' . drupal_get_path('theme', 'oe_theme') . '/dist/' . $variables['ecl_component_library'] . '/images/logo/';
$ecl_logo .= $variables['ecl_component_library'] === 'eu' ? 'standard-version/positive/' : '';
$ecl_logo .= $variables['ecl_component_library'] === 'eu' ? 'standard-version/positive/' : 'positive/';
$ecl_logo .= 'logo-' . $variables['ecl_component_library'] . '--' . $language_code . '.svg';
if (!file_exists($ecl_logo)) {
// Provide fallback "en" icon if language logo doesn't exist.
Expand Down
92 changes: 46 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,53 @@
"prepare": "patch-package"
},
"dependencies": {
"@ecl/builder": "3.2.2",
"@ecl/preset-ec": "3.2.2",
"@ecl/preset-eu": "3.2.2",
"@ecl/preset-reset": "3.2.2",
"@ecl/builder": "3.2.3",
"@ecl/preset-ec": "3.2.3",
"@ecl/preset-eu": "3.2.3",
"@ecl/preset-reset": "3.2.3",
"@ecl/stylelint-config": "0.2.1",
"@ecl/theme-ec": "3.2.2",
"@ecl/theme-eu": "3.2.2",
"@ecl/twig-component-accordion": "3.2.2",
"@ecl/twig-component-blockquote": "3.2.2",
"@ecl/twig-component-breadcrumb-core": "3.2.2",
"@ecl/twig-component-breadcrumb-standardised": "3.2.2",
"@ecl/twig-component-button": "3.2.2",
"@ecl/twig-component-card": "3.2.2",
"@ecl/twig-component-datepicker": "3.2.2",
"@ecl/twig-component-description-list": "3.2.2",
"@ecl/twig-component-expandable": "3.2.2",
"@ecl/twig-component-fact-figures": "3.2.2",
"@ecl/twig-component-file": "3.2.2",
"@ecl/twig-component-footer-core": "3.2.2",
"@ecl/twig-component-footer-standardised": "3.2.2",
"@ecl/twig-component-gallery": "3.2.2",
"@ecl/twig-component-hero-banner": "3.2.2",
"@ecl/twig-component-icon": "3.2.2",
"@ecl/twig-component-inpage-navigation": "3.2.2",
"@ecl/twig-component-language-list": "3.2.2",
"@ecl/twig-component-link": "3.2.2",
"@ecl/twig-component-label": "3.2.2",
"@ecl/twig-component-media-container": "3.2.2",
"@ecl/twig-component-menu": "3.2.2",
"@ecl/twig-component-message": "3.2.2",
"@ecl/twig-component-page-banner": "3.2.2",
"@ecl/twig-component-page-header-core": "3.2.2",
"@ecl/twig-component-page-header-standardised": "3.2.2",
"@ecl/twig-component-pagination": "3.2.2",
"@ecl/twig-component-radio": "3.2.2",
"@ecl/twig-component-search-form": "3.2.2",
"@ecl/twig-component-site-header-core": "3.2.2",
"@ecl/twig-component-site-header-standardised": "3.2.2",
"@ecl/twig-component-skip-link": "3.2.2",
"@ecl/twig-component-social-media-follow": "3.2.2",
"@ecl/twig-component-social-media-share": "3.2.2",
"@ecl/twig-component-table": "3.2.2",
"@ecl/twig-component-tag": "3.2.2",
"@ecl/twig-component-text-input": "3.2.2",
"@ecl/twig-component-timeline": "3.2.2",
"@ecl/vanilla-utility-background": "3.2.2",
"@ecl/vanilla-utility-border": "3.2.2",
"@ecl/theme-ec": "3.2.3",
"@ecl/theme-eu": "3.2.3",
"@ecl/twig-component-accordion": "3.2.3",
"@ecl/twig-component-blockquote": "3.2.3",
"@ecl/twig-component-breadcrumb-core": "3.2.3",
"@ecl/twig-component-breadcrumb-standardised": "3.2.3",
"@ecl/twig-component-button": "3.2.3",
"@ecl/twig-component-card": "3.2.3",
"@ecl/twig-component-datepicker": "3.2.3",
"@ecl/twig-component-description-list": "3.2.3",
"@ecl/twig-component-expandable": "3.2.3",
"@ecl/twig-component-fact-figures": "3.2.3",
"@ecl/twig-component-file": "3.2.3",
"@ecl/twig-component-footer-core": "3.2.3",
"@ecl/twig-component-footer-standardised": "3.2.3",
"@ecl/twig-component-gallery": "3.2.3",
"@ecl/twig-component-hero-banner": "3.2.3",
"@ecl/twig-component-icon": "3.2.3",
"@ecl/twig-component-inpage-navigation": "3.2.3",
"@ecl/twig-component-language-list": "3.2.3",
"@ecl/twig-component-link": "3.2.3",
"@ecl/twig-component-label": "3.2.3",
"@ecl/twig-component-media-container": "3.2.3",
"@ecl/twig-component-menu": "3.2.3",
"@ecl/twig-component-message": "3.2.3",
"@ecl/twig-component-page-banner": "3.2.3",
"@ecl/twig-component-page-header-core": "3.2.3",
"@ecl/twig-component-page-header-standardised": "3.2.3",
"@ecl/twig-component-pagination": "3.2.3",
"@ecl/twig-component-radio": "3.2.3",
"@ecl/twig-component-search-form": "3.2.3",
"@ecl/twig-component-site-header-core": "3.2.3",
"@ecl/twig-component-site-header-standardised": "3.2.3",
"@ecl/twig-component-skip-link": "3.2.3",
"@ecl/twig-component-social-media-follow": "3.2.3",
"@ecl/twig-component-social-media-share": "3.2.3",
"@ecl/twig-component-table": "3.2.3",
"@ecl/twig-component-tag": "3.2.3",
"@ecl/twig-component-text-input": "3.2.3",
"@ecl/twig-component-timeline": "3.2.3",
"@ecl/vanilla-utility-background": "3.2.3",
"@ecl/vanilla-utility-border": "3.2.3",
"chokidar-cli": "1.2.0",
"grunt": "^1.4.0",
"grunt-contrib-copy": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion templates/blocks/block--system-branding-block.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
alt="{{ site_logo_alt }}"
title="{{ site_logo_title }}"
class="ecl-site-header-{{ ecl_branding }}__logo-image ecl-site-header-{{ ecl_branding }}__logo-image-desktop"
src="{{ ecl_logo_path ~ '/logo-ec--' ~ current_language_id|to_internal_language_id ~ '.svg'}}"
src="{{ ecl_logo_path ~ '/positive/logo-ec--' ~ current_language_id|to_internal_language_id ~ '.svg'}}"
/>
{% endif %}
</a>
Expand Down
41 changes: 19 additions & 22 deletions tests/src/Kernel/StatusMessagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,9 @@ public function testStatusMessages(array $data): void {
$this->assertCount(1, $title, sprintf('Wrong number of headings found for "%s" messages.', $type));
$this->assertEquals($heading, trim($title->first()->text()));

$list_items = $wrapper->filter('p.ecl-message__description span');
$this->assertSameSize($messages, $list_items, sprintf('Wrong number of "%s" messages found.', $type));

foreach ($messages as $delta => $message) {
$this->assertEquals($message, trim($list_items->eq($delta)->text()));
}
$description = $wrapper->filter('div.ecl-message__description');
$this->assertCount(1, $description, sprintf('Wrong number of "%s" messages found.', $type));
$this->assertEquals(implode($messages), trim($description->text()));
}

// Verify that no message types other than the ones present in the test data
Expand Down Expand Up @@ -124,25 +121,25 @@ public function statusMessagesProvider(): array {
[
[
MessengerInterface::TYPE_STATUS => [
'Status message 1.',
'Status message 2.',
'<p>Status message 1.</p><br>',
'Status message <strong>2</strong>.',
],
],
],
// A test case with a single "warning" message.
[
[
MessengerInterface::TYPE_WARNING => [
'Warning message 1.',
'<div>Warning message 1.</div>',
],
],
],
// A test case with multiple "warning" messages.
[
[
MessengerInterface::TYPE_WARNING => [
'Warning message 1.',
'Warning message 2.',
'<p>Warning message 1.</p><br>',
'Warning message 2.<br>',
'Warning message 3.',
],
],
Expand All @@ -159,9 +156,9 @@ public function statusMessagesProvider(): array {
[
[
MessengerInterface::TYPE_ERROR => [
'Error message 1.',
'Error message 2.',
'Error message 3.',
'<h3>Error message 1.</h3><br>',
'<p>Error message 2.</p><br>',
'Error message 3.<br>',
'Error message 4.',
],
],
Expand All @@ -170,23 +167,23 @@ public function statusMessagesProvider(): array {
[
[
MessengerInterface::TYPE_STATUS => [
'Status message 1.',
'<p>Status message 1.</p><br>',
],
MessengerInterface::TYPE_WARNING => [
'Warning message 1.',
'<p>Warning message 1.</p>',
],
],
],
// A test case with two message types with multiple messages for each one.
[
[
MessengerInterface::TYPE_ERROR => [
'Error message 1.',
'Error message 1.<br>',
'Error message 2.',
],
MessengerInterface::TYPE_WARNING => [
'Warning message 1.',
'Warning message 2.',
'Warning message 1.<br>',
'Warning message 2.<br>',
'Warning message 3.',
],
],
Expand All @@ -195,13 +192,13 @@ public function statusMessagesProvider(): array {
[
[
MessengerInterface::TYPE_STATUS => [
'Status message 1.',
'Status message <strong>1</strong>.',
],
MessengerInterface::TYPE_WARNING => [
'Warning message 1.',
'Warning message <strong>1</strong>.',
],
MessengerInterface::TYPE_ERROR => [
'Error message 1.',
'Error message 1.<br>',
'Error message 2.',
],
],
Expand Down

0 comments on commit f0527aa

Please sign in to comment.