Skip to content

Commit

Permalink
Merge pull request #1449 from openeuropa/EWPP-4314
Browse files Browse the repository at this point in the history
EWPP-4314: Update EU footer data.
  • Loading branch information
upchuk authored Jun 3, 2024
2 parents 1710852 + 44c9733 commit 2b1f40f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
16 changes: 8 additions & 8 deletions tests/src/Functional/CorporateFooterRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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'];
Expand All @@ -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());
Expand Down

0 comments on commit 2b1f40f

Please sign in to comment.