From 44c97337047ccf24474aff786c788a7df2570099 Mon Sep 17 00:00:00 2001 From: nagyad Date: Thu, 2 May 2024 15:45:14 +0200 Subject: [PATCH] EWPP-4314: Update EU footer data. --- composer.json | 3 +++ ...oe-corporate-blocks-eu-footer--core.html.twig | 4 ++-- ...rate-blocks-eu-footer--standardised.html.twig | 6 +++--- .../src/Functional/CorporateFooterRenderTest.php | 16 ++++++++-------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 99a075003..8a8c43c63 100644 --- a/composer.json +++ b/composer.json @@ -104,6 +104,9 @@ }, "drupal/address": { "https://www.drupal.org/project/address/issues/3144823": "https://www.drupal.org/files/issues/2020-11-05/3144823-6.patch" + }, + "openeuropa/oe_corporate_blocks": { + "latest": "https://github.com/openeuropa/oe_corporate_blocks/compare/4.18.0..4.x.patch" } }, "drupal-scaffold": { diff --git a/templates/navigation/oe-corporate-blocks-eu-footer--core.html.twig b/templates/navigation/oe-corporate-blocks-eu-footer--core.html.twig index efab938d8..edd2fcce3 100644 --- a/templates/navigation/oe-corporate-blocks-eu-footer--core.html.twig +++ b/templates/navigation/oe-corporate-blocks-eu-footer--core.html.twig @@ -37,13 +37,13 @@ 'title_with_separator': false, 'links': ecl_footer_links(corporate_footer.social_media), }, + ], + [ { 'title': corporate_footer.legal_links_title, 'title_with_separator': false, 'links': ecl_footer_links(corporate_footer.legal_links), }, - ], - [ { 'title': corporate_footer.institution_links_title, 'title_with_separator': false, diff --git a/templates/navigation/oe-corporate-blocks-eu-footer--standardised.html.twig b/templates/navigation/oe-corporate-blocks-eu-footer--standardised.html.twig index 8c21b5d0d..9203d9cfb 100644 --- a/templates/navigation/oe-corporate-blocks-eu-footer--standardised.html.twig +++ b/templates/navigation/oe-corporate-blocks-eu-footer--standardised.html.twig @@ -79,13 +79,13 @@ 'links': ecl_footer_links(corporate_footer.social_media), 'title_with_separator': false, }, + ], + [ { 'title': corporate_footer.legal_links_title, 'links': ecl_footer_links(corporate_footer.legal_links), 'title_with_separator': false, - } - ], - [ + }, { 'title': corporate_footer.institution_links_title, 'links': ecl_footer_links(corporate_footer.institution_links), diff --git a/tests/src/Functional/CorporateFooterRenderTest.php b/tests/src/Functional/CorporateFooterRenderTest.php index df4793a0f..91b3da442 100644 --- a/tests/src/Functional/CorporateFooterRenderTest.php +++ b/tests/src/Functional/CorporateFooterRenderTest.php @@ -257,20 +257,20 @@ public function testCorporateFooterRendering(): void { $this->assertListLink($actual, $expected); } - $subsection = $assert->elementExists('css', '.ecl-site-footer__section:nth-child(3)', $column); + $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(1)'); - $actual = $subsection->find('css', '.ecl-site-footer__title'); + $actual = $section->find('css', '.ecl-site-footer__title'); $this->assertEquals('Legal links title', $actual->getText()); $items = $data['legal_links']; foreach ($items as $key => $expected) { $index = $key + 1; - $actual = $subsection->find('css', "ul li:nth-child({$index}) > a"); + $actual = $section->find('css', "ul li:nth-child({$index}) > a"); $this->assertListLink($actual, $expected); } - $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(1)'); + $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(2)'); $actual = $section->find('css', '.ecl-site-footer__title'); $this->assertEquals('Institution links title', $actual->getText()); @@ -350,9 +350,9 @@ public function testCorporateFooterRendering(): void { $this->assertListLink($actual, $expected); } - $subsection = $assert->elementExists('css', '.ecl-site-footer__section:nth-child(3)', $column); + $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__row:nth-child(2) div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(1)'); - $actual = $subsection->find('css', '.ecl-site-footer__title'); + $actual = $section->find('css', '.ecl-site-footer__title'); $this->assertEquals('Legal links title', $actual->getText()); $items = $data['legal_links']; @@ -361,11 +361,11 @@ public function testCorporateFooterRendering(): void { array_pop($items); foreach ($items as $key => $expected) { $index = $key + 1; - $actual = $subsection->find('css', "ul li:nth-child({$index}) > a"); + $actual = $section->find('css', "ul li:nth-child({$index}) > a"); $this->assertListLink($actual, $expected); } - $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__row:nth-child(2) div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(1)'); + $section = $assert->elementExists('css', 'footer.ecl-site-footer div.ecl-site-footer__row:nth-child(2) div.ecl-site-footer__column:nth-child(3) div.ecl-site-footer__section:nth-child(2)'); $actual = $section->find('css', '.ecl-site-footer__title'); $this->assertEquals('Institution links title', $actual->getText());