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

SITES-6887: fix some resource type to model bindings #940

Closed buuhuu closed 2 years ago

buuhuu commented 2 years ago

Description

This PR update the resource type binding of the CurrentPageImpl and the SearchResultsImpl.

With https://github.com/adobe/aem-core-wcm-components/pull/2246 the LatestVersionImplementationPicker will adapt the productlist v2 request not to the CurrentPageImpl but to the Page v3 model instead. This should not have any affect yet, however it may be missed in the future when using other methods added to Page in CIF in the future.

Related Issue

https://github.com/adobe/aem-core-wcm-components/pull/2246

Motivation and Context

We should make sure that the resource type binding of our models is correct to prevent situations where the models class would inject itself in a recursive way and so cause issues.

How Has This Been Tested?

Locally

Screenshots (if appropriate):

Types of changes

Checklist:

codecov[bot] commented 2 years ago

Codecov Report

Merging #940 (0373c7f) into master (1bc2813) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #940   +/-   ##
=========================================
  Coverage     89.72%   89.72%           
  Complexity     2148     2148           
=========================================
  Files           346      346           
  Lines          9660     9660           
  Branches       1391     1391           
=========================================
  Hits           8667     8667           
  Misses          712      712           
  Partials        281      281           
Flag Coverage Δ
integration 52.24% <ø> (ø)
jest 86.55% <ø> (ø)
karma 95.33% <ø> (ø)
unittests 88.80% <ø> (ø)

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

Impacted Files Coverage Δ
...nents/internal/models/v1/page/CurrentPageImpl.java 100.00% <ø> (ø)
...ls/v1/productcollection/ProductCollectionImpl.java 97.14% <ø> (ø)
...nal/models/v1/searchresults/SearchResultsImpl.java 96.66% <ø> (ø)

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 1bc2813...0373c7f. Read the comment docs.