adobe / aem-core-cif-components

A set of configurations and components to get you started with AEM Commerce development
Apache License 2.0
103 stars 80 forks source link

CIF-2913: remove category_uid from remove filter map #924

Closed buuhuu closed 2 years ago

buuhuu commented 2 years ago

Description

With #643 we remove the category_uid filter request parameter when the value can be parsed from the url which is the case for PLPs. This worked well for adding facet filters, but we missed to handle removing the facets.

This change removes the category_uid also from a SearchAggregations remove filter map.

Related Issue

CIF-2913

643

Motivation and Context

Usually requests that contain request parameters are not cached by the dispatcher. To increase the cache ratio we remove unnecessary request parameters for the product list component so that the dispatcher cached page can be served.

How Has This Been Tested?

Unit tests, locally

Screenshots (if appropriate):

Types of changes

Checklist:

codecov[bot] commented 2 years ago

Codecov Report

Merging #924 (a386ab3) into master (1775a1e) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #924      +/-   ##
============================================
+ Coverage     89.71%   89.73%   +0.01%     
- Complexity     2016     2018       +2     
============================================
  Files           338      338              
  Lines          9260     9261       +1     
  Branches       1316     1318       +2     
============================================
+ Hits           8308     8310       +2     
+ Misses          679      678       -1     
  Partials        273      273              
Flag Coverage Δ
integration 52.83% <100.00%> (+0.02%) :arrow_up:
jest 86.38% <ø> (ø)
karma 95.68% <ø> (ø)
unittests 88.83% <100.00%> (+0.02%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ch/internal/services/SearchResultsServiceImpl.java 95.68% <100.00%> (+0.01%) :arrow_up:
.../search/internal/models/SearchAggregationImpl.java 100.00% <0.00%> (+3.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1775a1e...a386ab3. Read the comment docs.