Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 437a3bee authored by escuriola's avatar escuriola
Browse files

OEL-579: Block Testing.

parent de7a3c51
No related branches found
No related tags found
1 merge request!36OEL-579 - Whitelabel - Medley branch with BCL 0.9.0 upgradel
...@@ -78,10 +78,14 @@ class FooterBlockTest extends SparqlKernelTestBase { ...@@ -78,10 +78,14 @@ class FooterBlockTest extends SparqlKernelTestBase {
$crawler = new Crawler($render->__toString()); $crawler = new Crawler($render->__toString());
// For now we assert only minimal till we have a footer component. // For now we assert only minimal till we have a footer component.
$actual = $crawler->filter('#block-ecfooterblock'); $rows = $crawler->filter('.row');
$this->assertCount(1, $actual); $this->assertCount(3, $rows);
$sections = $actual->filter('.row'); $borderedSections = $crawler->filter('.bcl-footer__bordered-row');
$this->assertCount(3, $sections); $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 @@ class FooterBlockTest extends SparqlKernelTestBase { ...@@ -109,10 +113,14 @@ class FooterBlockTest extends SparqlKernelTestBase {
$crawler = new Crawler($render->__toString()); $crawler = new Crawler($render->__toString());
// For now we assert only minimal till we have a footer component. // For now we assert only minimal till we have a footer component.
$actual = $crawler->filter('#block-eufooterblock'); $rows = $crawler->filter('.row');
$this->assertCount(1, $actual); $this->assertCount(2, $rows);
$sections = $actual->filter('.row'); $borderedSections = $crawler->filter('.bcl-footer__bordered-row');
$this->assertCount(2, $sections); $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% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment