Skip to content

Commit

Permalink
OEL-579: Block Testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
escuriola committed Oct 26, 2021
1 parent de7a3c5 commit 437a3be
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions tests/src/Kernel/FooterBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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);
}

}

0 comments on commit 437a3be

Please sign in to comment.