diff --git a/composer.json b/composer.json index cd89274e4f7f2af57d8efed91ced88cb0ff82043..762f2650714637d9dcac49f9ac285cca14398a1e 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "drupal/daterange_compact": "^2.0", "drupal/twig_field_value": "^2.0", "openeuropa/composer-artifacts": "^1.0.0-alpha1", - "openeuropa/oe_bootstrap_theme": "^1.0.0-beta4" + "openeuropa/oe_bootstrap_theme": "0.1.202208041835" }, "require-dev": { "composer/installers": "^1.11", @@ -95,9 +95,6 @@ "patches": { "drupal/entity_reference_revisions": { "https://www.drupal.org/project/entity_reference_revisions/issues/2937835": "https://www.drupal.org/files/issues/2021-03-26/entity_reference_revisions-field_formatter_label-2937835-36.patch" - }, - "openeuropa/oe_bootstrap_theme": { - "temporary ticket patch": "https://patch-diff.githubusercontent.com/raw/openeuropa/oe_bootstrap_theme/pull/250.diff" } }, "drupal-scaffold": { diff --git a/modules/oe_whitelabel_list_pages/tests/src/Functional/ListPagesTest.php b/modules/oe_whitelabel_list_pages/tests/src/Functional/ListPagesTest.php index 477b6f07a458bee120555c288486c036344487ab..9f08c64ecb14099e2af017101c362342574c8b13 100644 --- a/modules/oe_whitelabel_list_pages/tests/src/Functional/ListPagesTest.php +++ b/modules/oe_whitelabel_list_pages/tests/src/Functional/ListPagesTest.php @@ -54,7 +54,7 @@ class ListPagesTest extends WhitelabelBrowserTestBase { // Assert offcanvas. $offcanvas = $left_column->find('css', 'div.bcl-offcanvas'); - $title = $offcanvas->find('css', 'h3.offcanvas-title'); + $title = $offcanvas->find('css', '.offcanvas-title'); $this->assertSame('Filter options', $title->getText()); $offcanvas->hasField('Title'); $offcanvas->hasButton('Search'); diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php index 6c5734deeead0a3493aae07d6d3cdeb416107110..b0bb03a50e885004857d7d4d08a276c3ed488878 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/ContentRowTest.php @@ -144,11 +144,11 @@ class ContentRowTest extends ParagraphsTestBase { $this->assertCount(1, $crawler->filter('div.row > div > nav.bcl-inpage-navigation')); $this->assertCount(8, $crawler->filter('p')); // Assert the left column navigation. - $left = $crawler->filter('div.col-md-3.d-none.d-md-block'); + $left = $crawler->filter('div.bcl-sidebar'); $nav = $left->filter('nav.bcl-inpage-navigation'); $this->assertCount(1, $nav); - $h3 = $nav->filter('h3'); - $this->assertSame('Page content', $h3->text()); + $h2 = $nav->filter('h2'); + $this->assertSame('Page content', $h2->text()); $ul = $left->filter('ul.nav.nav-pills.flex-column'); $this->assertCount(1, $ul); $links = $ul->filter('li.nav-item a.nav-link'); diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/FactsFiguresTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/FactsFiguresTest.php index 49daf942cba5653dfaebe18bd3786d4a538bf809..050b1535fc6c83081f0112241d514eb8cb464658 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/FactsFiguresTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/FactsFiguresTest.php @@ -83,7 +83,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $this->assertCount(1, $crawler->filter('h2.bcl-heading')); $this->assertCount(1, $crawler->filter('div.row-cols-md-3.row')); $this->assertCount(6, $crawler->filter('svg.bi.icon--l')); - $this->assertCount(6, $crawler->filter('div.fs-3')); + $this->assertCount(6, $crawler->filter('div.fs-4')); $this->assertCount(6, $crawler->filter('div.fs-5')); $this->assertCount(6, $crawler->filter('div.col')); @@ -93,7 +93,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $link->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(1) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(1) > div.fs-4'); $this->assertStringContainsString( '1529 JIRA Ticket', $title_fact->html() @@ -109,7 +109,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $description_fact->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(2) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(2) > div.fs-4'); $this->assertStringContainsString( '337 Features', $title_fact->html() @@ -125,7 +125,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $description_fact->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(3) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(3) > div.fs-4'); $this->assertStringContainsString( '107 Tests', $title_fact->html() @@ -141,7 +141,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $description_fact->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(4) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(4) > div.fs-4'); $this->assertStringContainsString( '5670 Variants', $title_fact->html() @@ -157,7 +157,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $description_fact->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(5) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(5) > div.fs-4'); $this->assertStringContainsString( '345 Dev Ticket', $title_fact->html() @@ -173,7 +173,7 @@ class FactsFiguresTest extends ParagraphsTestBase { $description_fact->html() ); - $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(6) > div.fs-3'); + $title_fact = $crawler->filter('div.row-cols-md-3.row > div.col:nth-child(6) > div.fs-4'); $this->assertStringContainsString( '43 Components', $title_fact->html() diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/TimelineParagraphTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/TimelineParagraphTest.php index 490a6598af0f4bb27012b121c132d6bd6d0dae31..793890477e9b0c864cb02ff6151425c894da29c8 100644 --- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/TimelineParagraphTest.php +++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/TimelineParagraphTest.php @@ -119,25 +119,25 @@ class TimelineParagraphTest extends ParagraphsTestBase { $this->assertCount(7, $crawler->filter('ol.bcl-timeline li')); $this->assertCount(1, $crawler->filter('ol.bcl-timeline li .label-collapsed')); $this->assertCount(1, $crawler->filter('ol.bcl-timeline li.bcl-timeline__item--toggle')); - $this->assertEquals('Label 1', trim($crawler->filter('ol.bcl-timeline li:nth-child(1) h5')->html())); - $this->assertEquals('Title 1', trim($crawler->filter('ol.bcl-timeline li:nth-child(1) h6')->html())); + $this->assertEquals('Label 1', trim($crawler->filter('ol.bcl-timeline li:nth-child(1) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 1', trim($crawler->filter('ol.bcl-timeline li:nth-child(1) p.fs-6.fw-medium')->html())); $this->assertEquals('Description 1', trim($crawler->filter('ol.bcl-timeline li:nth-child(1) div')->html())); - $this->assertEquals('Label 2', trim($crawler->filter('ol.bcl-timeline li:nth-child(2) h5')->html())); - $this->assertEquals('Title 2', trim($crawler->filter('ol.bcl-timeline li:nth-child(2) h6')->html())); + $this->assertEquals('Label 2', trim($crawler->filter('ol.bcl-timeline li:nth-child(2) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 2', trim($crawler->filter('ol.bcl-timeline li:nth-child(2) p.fs-6.fw-medium')->html())); // Explicit format "plain_text" specified. $this->assertEquals('<p>Description 2</p>', trim($crawler->filter('ol.bcl-timeline li:nth-child(2) div')->html())); - $this->assertEquals('Label 3', trim($crawler->filter('ol.bcl-timeline li:nth-child(3) h5')->html())); - $this->assertEquals('Title 3', trim($crawler->filter('ol.bcl-timeline li:nth-child(3) h6')->html())); + $this->assertEquals('Label 3', trim($crawler->filter('ol.bcl-timeline li:nth-child(3) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 3', trim($crawler->filter('ol.bcl-timeline li:nth-child(3) p.fs-6.fw-medium')->html())); $this->assertEquals('<p>Description <strong>3</strong></p>', trim($crawler->filter('ol.bcl-timeline li:nth-child(3) div')->html())); - $this->assertEquals('Label 4', trim($crawler->filter('ol.bcl-timeline li:nth-child(4) h5')->html())); - $this->assertEquals('Title 4', trim($crawler->filter('ol.bcl-timeline li:nth-child(4) h6')->html())); + $this->assertEquals('Label 4', trim($crawler->filter('ol.bcl-timeline li:nth-child(4) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 4', trim($crawler->filter('ol.bcl-timeline li:nth-child(4) p.fs-6.fw-medium')->html())); // Explicit format "filtered_html" specified. $this->assertEquals('Description <strong>4</strong>', trim($crawler->filter('ol.bcl-timeline li:nth-child(4) div')->html())); $this->assertEquals('<p>Description <strong>5</strong></p>', trim($crawler->filter('ol.bcl-timeline li:nth-child(5) div')->html())); - $this->assertEquals('Label 5', trim($crawler->filter('ol.bcl-timeline li:nth-child(5) h5')->html())); - $this->assertEquals('Title 5', trim($crawler->filter('ol.bcl-timeline li:nth-child(5) h6')->html())); - $this->assertEquals('Label 6', trim($crawler->filter('ol.bcl-timeline li:nth-child(6) h5')->html())); - $this->assertEquals('Title 6', trim($crawler->filter('ol.bcl-timeline li:nth-child(6) h6')->html())); + $this->assertEquals('Label 5', trim($crawler->filter('ol.bcl-timeline li:nth-child(5) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 5', trim($crawler->filter('ol.bcl-timeline li:nth-child(5) p.fs-6.fw-medium')->html())); + $this->assertEquals('Label 6', trim($crawler->filter('ol.bcl-timeline li:nth-child(6) p.fs-5.fw-medium')->html())); + $this->assertEquals('Title 6', trim($crawler->filter('ol.bcl-timeline li:nth-child(6) p.fs-6.fw-medium')->html())); // Explicit format "full_html" specified. $this->assertEquals('Description 6', trim($crawler->filter('ol.bcl-timeline li:nth-child(6) div')->html())); $this->assertEquals('Show more 3 items', trim($crawler->filter('button .label-collapsed')->text())); diff --git a/templates/list_pages/node--oe-list-page--full.html.twig b/templates/list_pages/node--oe-list-page--full.html.twig index 9a65ef87714b3b7c0cbe4b64b4551493d47e4886..46841e6663c91ac3004e0a6d724d098794656cd7 100644 --- a/templates/list_pages/node--oe-list-page--full.html.twig +++ b/templates/list_pages/node--oe-list-page--full.html.twig @@ -1,7 +1,7 @@ {% apply spaceless %} {{ content|without('extra_field_oe_list_page_filters:node:oe_list_page', 'extra_field_oe_list_page_results:node:oe_list_page', 'extra_field_oe_list_page_selected_filters:node:oe_list_page', 'extra_field_oe_list_page_total_count:node:oe_list_page') }} <div class="row"> - <div class="col-12 col-lg-3"> + <div class="col-12 bcl-sidebar col-lg-3"> {% set filters = content['extra_field_oe_list_page_filters:node:oe_list_page']|render %} {% if filters %} {{ pattern('offcanvas', { diff --git a/templates/overrides/page/page.html.twig b/templates/overrides/page/page.html.twig index d5f7e0c5672ec9a09e066912cdebe9b503d758b6..ee35f26ad5499c8372d2a6d257912b61e0a9c3c5 100644 --- a/templates/overrides/page/page.html.twig +++ b/templates/overrides/page/page.html.twig @@ -126,7 +126,7 @@ {% endif %} {% if page.sidebar_left %} - <div class="col-12 col-lg-3"> + <div class="col-12 bcl-sidebar col-lg-3"> {{ page.sidebar_left }} </div> {% endif %} diff --git a/tests/src/Functional/ContentEventRenderTest.php b/tests/src/Functional/ContentEventRenderTest.php index 7b20eb84d939933ac61bec1ee3a87946f76e13b7..7097c9ea947064971959f30f814ee7010095c57d 100644 --- a/tests/src/Functional/ContentEventRenderTest.php +++ b/tests/src/Functional/ContentEventRenderTest.php @@ -123,7 +123,7 @@ class ContentEventRenderTest extends WhitelabelBrowserTestBase { // Assert in-page navigation title. $this->assertEquals( 'Page content', - trim($crawler->filter('nav.bcl-inpage-navigation > h3')->text()) + trim($crawler->filter('nav.bcl-inpage-navigation > h2')->text()) ); // Assert in-page navigation links. diff --git a/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php index 9ccfea9a5c93d3e6cd5b361d1b4057c569b1029e..6bf1ccbaae9004fee4520e94313bf6616e632d23 100644 --- a/tests/src/Kernel/FacetsFormTest.php +++ b/tests/src/Kernel/FacetsFormTest.php @@ -96,7 +96,7 @@ class FacetsFormTest extends KernelTestBase { $offcanvas = $crawler->filter('div#bcl-offcanvas'); $header = $offcanvas->filter('div.offcanvas-header'); $this->assertCount(1, $header); - $title = $header->filter('h3.offcanvas-title'); + $title = $header->filter('.offcanvas-title'); $this->assertSame('Facets form', $title->text()); $button = $header->filter('button'); $this->assertSame('offcanvas', $button->attr('data-bs-dismiss')); diff --git a/tests/src/PatternAssertions/InPageNavigationAssert.php b/tests/src/PatternAssertions/InPageNavigationAssert.php index a367f48953b917d2869a25c6034163083e47b5db..a5c3bada673518a9e83fb38757cbda16e7fd7b89 100644 --- a/tests/src/PatternAssertions/InPageNavigationAssert.php +++ b/tests/src/PatternAssertions/InPageNavigationAssert.php @@ -18,7 +18,7 @@ class InPageNavigationAssert extends BasePatternAssert { return [ 'title' => [ [$this, 'assertElementText'], - 'h3', + 'h2', ], 'links' => [ [$this, 'assertList'],