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

Skip to content
Snippets Groups Projects
Commit a6605ae1 authored by drishu's avatar drishu
Browse files

OEL-1919: Adapt test to markup changes.

parent 22ca2f9b
No related branches found
No related tags found
1 merge request!176OEL-1919: Fix broken styling for facetapi.
...@@ -99,6 +99,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase { ...@@ -99,6 +99,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase {
$this->drupalGet('search-api-test-fulltext'); $this->drupalGet('search-api-test-fulltext');
$assert = $this->assertSession(); $assert = $this->assertSession();
$block = $assert->elementExists('css', '#block-emu'); $block = $assert->elementExists('css', '#block-emu');
$this->assertTrue($block->hasClass('mb-3'));
// Assert the block title rendering. // Assert the block title rendering.
$title_wrapper = $block->find('css', 'legend.col-form-label'); $title_wrapper = $block->find('css', 'legend.col-form-label');
...@@ -107,7 +108,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase { ...@@ -107,7 +108,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase {
$this->assertNotNull($title); $this->assertNotNull($title);
// Assert the checkbox list rendering. // Assert the checkbox list rendering.
$list = $block->find('css', 'ul.oel-facets-checkbox-list'); $list = $block->find('css', 'ul');
$this->assertFalse($list->hasClass('form-select')); $this->assertFalse($list->hasClass('form-select'));
$items = $list->findAll('css', 'li.mb-2'); $items = $list->findAll('css', 'li.mb-2');
$this->assertCount(2, $items); $this->assertCount(2, $items);
...@@ -119,8 +120,9 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase { ...@@ -119,8 +120,9 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase {
// Assert the dropdown list rendering. // Assert the dropdown list rendering.
$block = $assert->elementExists('css', '#block-pingu'); $block = $assert->elementExists('css', '#block-pingu');
$this->assertTrue($block->hasClass('mb-3'));
$list = $block->find('css', 'ul.form-select'); $list = $block->find('css', 'ul.form-select');
$this->assertFalse($list->hasClass('oel-facets-checkbox-list'));
$items = $list->findAll('css', 'li.mb-2'); $items = $list->findAll('css', 'li.mb-2');
$this->assertCount(2, $items); $this->assertCount(2, $items);
...@@ -132,6 +134,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase { ...@@ -132,6 +134,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase {
// Assert the links list rendering. // Assert the links list rendering.
$block = $assert->elementExists('css', '#block-lulu'); $block = $assert->elementExists('css', '#block-lulu');
$this->assertTrue($block->hasClass('mb-3'));
// Assert the facet title renders the same as block title. // Assert the facet title renders the same as block title.
$title_wrapper = $block->find('css', 'legend.col-form-label'); $title_wrapper = $block->find('css', 'legend.col-form-label');
...@@ -141,8 +144,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase { ...@@ -141,8 +144,7 @@ class FacetsRenderTest extends WhitelabelBrowserTestBase {
$list = $block->find('css', 'ul'); $list = $block->find('css', 'ul');
$this->assertFalse($list->hasClass('form-select')); $this->assertFalse($list->hasClass('form-select'));
$this->assertFalse($list->hasClass('oel-facets-checkbox-list')); $items = $list->findAll('css', 'li.mb-1');
$items = $list->findAll('css', 'li.mb-2');
$this->assertCount(2, $items); $this->assertCount(2, $items);
foreach ($items as $item) { foreach ($items as $item) {
......
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