Skip to content

Commit

Permalink
Merge pull request #317 from openeuropa/OEL-3418
Browse files Browse the repository at this point in the history
OEL-3418: Changed list title for listing and search.
  • Loading branch information
drishu authored Oct 9, 2024
2 parents 4d66b5f + 98c2997 commit 6ba52fb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function createListPage(): NodeInterface {
* Container with the expected elements.
*/
protected function assertFacetsSummaryTitle(int $expected_count, ElementInterface $container): void {
$title = $container->find('css', 'div.col-md-6.col-xl-8 h4');
$title = $container->find('css', 'div.col-md-6.col-xl-8 h2');
$text = $title->find('css', 'span.text-capitalize');

$this->assertSame(
Expand Down
4 changes: 2 additions & 2 deletions templates/list_pages/node--oe-list-page--full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<div class="col-12 col-lg-9">
<div class="row">
<div class="col-md-6 col-xl-8 align-self-center">
<h4 class="mb-0">
<h2 class="mb-0 fs-4">
<span class="text-capitalize">{{ label }}</span>
({{ content['extra_field_oe_list_page_total_count:node:oe_list_page'] }})
</h4>
</h2>
</div>
{% set selected_filters %}
{{ content['extra_field_oe_list_page_selected_filters:node:oe_list_page']|merge({'#theme': 'field__bare'}) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
{{ title_prefix }}
{% if label %}
<div class="col-md-6 col-lg-8 align-self-center">
<h4 class="mb-0"><span class="text-capitalize">{{ label }} </span> {{ results_count }}</h4>
<h2 class="mb-0 fs-4">
<span class="text-capitalize">{{ label }} </span>
{{ results_count }}
</h2>
</div>
{% endif %}
{{ title_suffix }}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Functional/FacetsRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function testFacetsSummaryBlock(): void {
$this->drupalGet('search-api-test-fulltext');

$assert = $this->assertSession();
$assert->elementTextContains('css', 'main h4', $block->label());
$assert->elementTextContains('css', 'main h2', $block->label());
$assert->elementTextContains('css', 'span.source-summary-count', '(5)');
}

Expand Down

0 comments on commit 6ba52fb

Please sign in to comment.