diff --git a/templates/language-selection-page/language-selection-page-content.html.twig b/templates/language-selection-page/language-selection-page-content.html.twig index 56026cd07..a7e1240aa 100644 --- a/templates/language-selection-page/language-selection-page-content.html.twig +++ b/templates/language-selection-page/language-selection-page-content.html.twig @@ -18,14 +18,27 @@ {% endif %} {% endif %} -{% include '@ecl-twig/language-list' with { +{% if ecl_component_library == 'eu' %} + {% set _title = 'European Union'|t %} + {% set _alt = 'European Union logo'|t %} + {% set logo_desktop_path = ecl_logo_path ~ '/standard-version/positive/logo-eu--' ~ current_language_id|to_internal_language_id ~ '.svg' %} + {% set logo_mobile_path = ecl_logo_path ~ '/condensed-version/positive/logo-eu--' ~ current_language_id|to_internal_language_id ~ '.svg' %} +{% else %} + {% set _title = 'European Commission'|t %} + {% set _alt = 'European Commission logo'|t %} + {% set logo_desktop_path = ecl_logo_path ~ '/positive/logo-ec--' ~ current_language_id|to_internal_language_id ~ '.svg' %} + {% set logo_mobile_path = ecl_logo_path ~ '/positive/logo-ec--mute.svg' %} +{% endif %} +{% include '@ecl-twig/splash-page' with { eu_category: eu_category, non_eu_category: non_eu_category, items: languages, non_eu_items: non_eu_languages, icon_path: ecl_icon_path, logo: { - alt: 'European Commission logo'|t, - path: ecl_logo_path ~ '/logo-' ~ ecl_component_library ~ '--mute.svg' + title: _title, + alt: _alt, + src_desktop: logo_desktop_path, + src_mobile: logo_mobile_path, } } only %} diff --git a/tests/src/Kernel/ContentLanguageSwitcherTest.php b/tests/src/Kernel/ContentLanguageSwitcherTest.php index 45f5cf1b2..78b66c2e2 100644 --- a/tests/src/Kernel/ContentLanguageSwitcherTest.php +++ b/tests/src/Kernel/ContentLanguageSwitcherTest.php @@ -43,7 +43,6 @@ protected function setUp(): void { * Test language switcher rendering. */ public function testLanguageSwitcherRendering(): void { - $this->markTestSkipped('Must be re-enabled before considering migration to ECL 4 as complete.'); $node = Node::create([ 'title' => 'Hello, world!', 'type' => 'oe_demo_translatable_page', @@ -117,7 +116,7 @@ public function testLanguageSwitcherRendering(): void { * The label of the language. */ protected function assertUnavailableLanguage(Crawler $crawler, string $expected): void { - $actual = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-message--warning')->text(); + $actual = $crawler->filter('div.ecl-lang-select-page div.ecl-container div.ecl-notification--warning')->text(); $this->assertStringContainsString($expected, trim($actual)); } diff --git a/tests/src/Kernel/LanguageSwitcherTest.php b/tests/src/Kernel/LanguageSwitcherTest.php index 339343d5b..54a47ec45 100644 --- a/tests/src/Kernel/LanguageSwitcherTest.php +++ b/tests/src/Kernel/LanguageSwitcherTest.php @@ -171,7 +171,6 @@ protected function assertDefaultLanguageBlock(): void { * @dataProvider renderingDataProvider */ public function testLanguageSwitcherRendering(string $langcode, string $langname): void { - $this->markTestSkipped('Must be re-enabled before considering migration to ECL 4 as complete.'); // Set the site default language. $this->config('system.site')->set('default_langcode', $langcode)->save(); if ($langcode === 'pt-pt') { @@ -185,9 +184,6 @@ public function testLanguageSwitcherRendering(string $langcode, string $langname $actual = $crawler->filter('a[data-ecl-language-selector]')->text(); $this->assertStringContainsString($langname, $actual); - $actual = $crawler->filter('a[data-ecl-language-selector]')->text(); - $this->assertEquals($langname, $actual); - // Make sure that the actual language link is set as active. $actual = $crawler->filter("div#language-list-overlay a.ecl-site-header__language-link.ecl-site-header__language-link--active[lang={$langcode}][hreflang={$langcode}] span.ecl-site-header__language-link-label")->text(); $this->assertEquals($langname, trim($actual)); diff --git a/tests/src/PatternAssertions/LinkBlockAssert.php b/tests/src/PatternAssertions/LinkBlockAssert.php index 9d0e07e3f..949151f62 100644 --- a/tests/src/PatternAssertions/LinkBlockAssert.php +++ b/tests/src/PatternAssertions/LinkBlockAssert.php @@ -33,7 +33,7 @@ protected function getAssertions($variant): array { */ protected function assertBaseElements(string $html, string $variant): void { $crawler = new Crawler($html); - $list_item = $crawler->filter('ul.ecl-link-block__list.ecl-unordered-list--no-bullet'); + $list_item = $crawler->filter('ul.ecl-link-block__list.ecl-unordered-list--no-marker'); self::assertCount(1, $list_item); }