Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIF-1354 - Refactor searchresults and productlist components #263

Merged
merged 10 commits into from
May 13, 2020
Merged

Conversation

LSantha
Copy link
Collaborator

@LSantha LSantha commented May 7, 2020

  • created productcollection component as common base component for productlist and searchresults
  • cleanup of unused methods in search classes
  • updated unit tests

Description

The searchresult and productlist components are almost identical, except for the way they fetch products, and except for the extra title and image in the productlist component.

They should be refactored to minimise the duplication of code, also maybe for the Sling Models.

Related PR: adobe/aem-cif-project-archetype#107

Related Issue

CIF-1354

How Has This Been Tested?

Manually, JUnit.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes and the overall coverage did not decrease.
  • All unit tests pass on CircleCi.
  • I ran all tests locally and they pass.

 * created productcollection component as common base component for productlist and searchresults
 * cleanup of unused methods in search classes
 * updated unit tests
@codecov
Copy link

codecov bot commented May 7, 2020

Codecov Report

Merging #263 into master will increase coverage by 0.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #263      +/-   ##
============================================
+ Coverage     63.19%   63.20%   +0.01%     
+ Complexity      755      754       -1     
============================================
  Files           172      173       +1     
  Lines          5360     5354       -6     
  Branches        842      840       -2     
============================================
- Hits           3387     3384       -3     
+ Misses         1856     1855       -1     
+ Partials        117      115       -2     
Flag Coverage Δ Complexity Δ
#jest 40.82% <ø> (ø) 0.00 <ø> (ø)
#karma 94.88% <100.00%> (ø) 0.00 <0.00> (ø)
#unittests 85.20% <83.33%> (+0.09%) 754.00 <14.00> (-1.00) ⬆️
Impacted Files Coverage Δ Complexity Δ
...core/search/internal/models/SearchOptionsImpl.java 100.00% <ø> (ø) 15.00 <0.00> (ø)
...ch/internal/services/SearchResultsServiceImpl.java 85.84% <ø> (+0.12%) 34.00 <0.00> (-1.00) ⬆️
...e/search/internal/models/SearchResultsSetImpl.java 62.16% <16.66%> (-7.29%) 16.00 <0.00> (-1.00)
...ls/v1/productcollection/ProductCollectionImpl.java 96.00% <96.00%> (ø) 11.00 <11.00> (?)
...nternal/models/v1/productlist/ProductListImpl.java 86.00% <100.00%> (+1.15%) 17.00 <1.00> (-6.00) ⬆️
...nal/models/v1/searchresults/SearchResultsImpl.java 100.00% <100.00%> (+10.52%) 8.00 <2.00> (-4.00) ⬆️
...oductcollection/clientlibs/js/productcollection.js 93.87% <100.00%> (ø) 0.00 <0.00> (?)

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 66e3d2e...0328c28. Read the comment docs.

LSantha and others added 6 commits May 11, 2020 12:09
@dplaton dplaton merged commit 6e79f7f into master May 13, 2020
@dplaton dplaton deleted the CIF-1354 branch May 13, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants