From 437a3beef0c0d36827a691180ba30d1de5883125 Mon Sep 17 00:00:00 2001 From: escuriola Date: Tue, 26 Oct 2021 15:44:32 +0200 Subject: [PATCH] OEL-579: Block Testing. --- tests/src/Kernel/FooterBlockTest.php | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/src/Kernel/FooterBlockTest.php b/tests/src/Kernel/FooterBlockTest.php index dbfd19056..2ee96845d 100644 --- a/tests/src/Kernel/FooterBlockTest.php +++ b/tests/src/Kernel/FooterBlockTest.php @@ -78,10 +78,14 @@ public function testEcFooterBlockRendering(): void { $crawler = new Crawler($render->__toString()); // For now we assert only minimal till we have a footer component. - $actual = $crawler->filter('#block-ecfooterblock'); - $this->assertCount(1, $actual); - $sections = $actual->filter('.row'); - $this->assertCount(3, $sections); + $rows = $crawler->filter('.row'); + $this->assertCount(3, $rows); + $borderedSections = $crawler->filter('.bcl-footer__bordered-row'); + $this->assertCount(2, $borderedSections); + $sectionTitles = $crawler->filter('p.fw-bold.mb-2'); + $this->assertCount(3, $sectionTitles); + $sectionLinks = $crawler->filter('div.col-12.col-lg-4:nth-child(2) a.text-decoration-none.d-block.mb-1'); + $this->assertCount(3, $sectionLinks); } /** @@ -109,10 +113,14 @@ public function testEuFooterBlockRendering(): void { $crawler = new Crawler($render->__toString()); // For now we assert only minimal till we have a footer component. - $actual = $crawler->filter('#block-eufooterblock'); - $this->assertCount(1, $actual); - $sections = $actual->filter('.row'); - $this->assertCount(2, $sections); + $rows = $crawler->filter('.row'); + $this->assertCount(2, $rows); + $borderedSections = $crawler->filter('.bcl-footer__bordered-row'); + $this->assertCount(1, $borderedSections); + $sectionTitles = $crawler->filter('p.fw-bold.mb-2'); + $this->assertCount(5, $sectionTitles); + $sectionLinks = $crawler->filter('div.col-12.col-lg-4:nth-child(2) a.text-decoration-none.d-block.mb-1'); + $this->assertCount(10, $sectionLinks); } }