When there is not a filter key facets use automatically the "f" letter but in the breadcrumbs part it fails to do that.

I will leave a patch in my next comment.

Regards.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gnuget created an issue. See original summary.

gnuget’s picture

Status: Active » Needs review
FileSize
2.19 KB
3.12 KB

Patch attached.

gnuget’s picture

The tests are passing but there is a non-related error:

Remaining deprecation notices (1)

Drupal\taxonomy\Tests\TaxonomyTestTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait: 1x
1x in ClassLoader::loadClass from Composer\Autoload

So, this is ready to be reviewed.

gnuget’s picture

It seems that

\Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait

doesn't event exists on Drupal 8.3, so I will test this again on 8.3 and expecting a green result.

Not sure what is the best time to start testing against 8.4 and how to make it green for both version at the same time.

borisson_’s picture

Status: Needs review » Needs work

Yeah, we're going to be testing against 8.4.x only from now on. I already fixed that fail in #2877989: Module depends on a search api service and it shouldn't, committing that soon.

The other changes look very good, thanks for the test. That one also looks good. I do have some nits to pick, sorry about that.

  1. +++ b/tests/src/Functional/BreadcrumbIntegrationTest.php
    @@ -48,16 +48,7 @@ public function setUp() {
         $name = 'Keywords';
    
    @@ -71,6 +62,42 @@ public function testGroupingIntegration() {
    +    $this->editFacetConfig(['filter_key' => $this->randomMachineName()]);
    

    We try not to use the random* functions in our testsuite. It could lead to testfails that are really hard to reproduce, so let's not do that and use a fixed value here instead.

  2. +++ b/tests/src/Functional/BreadcrumbIntegrationTest.php
    @@ -71,6 +62,42 @@ public function testGroupingIntegration() {
    +   * @param array $config
    +   */
    

    Let's document this clearer, something like: "The new configuration for the facet"

  3. +++ b/tests/src/Functional/BreadcrumbIntegrationTest.php
    @@ -71,6 +62,42 @@ public function testGroupingIntegration() {
    +  public function breadcrumbTest() {
    +
         // Breadcrumb should show Keywords: orange > Type: article, item
    

    Let's remove the blank line in the test here, and also - this doesn't need to be a public method. Let's make it protected.

gnuget’s picture

Status: Needs work » Needs review
FileSize
1.3 KB
3.15 KB

Hi borisson_.

Thanks for your review.

New patch attached.

Regards.

  • borisson_ committed 13c29d1 on 8.x-1.x authored by gnuget
    Issue #2890024 by gnuget: Wrong breadcrumb link when the filter key is...
borisson_’s picture

Status: Needs review » Fixed

Committed and pushed, thanks for the patch and the test, wonderful!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.