Skip to content

Conversation

@brandonmaynard
Copy link
Contributor

I am facing an issue where if I try to load a simple product on the PDP, the GraphQL response has 2 products listed. The first product is a bundled product which contains the requested simple product in it. The second product is the actual simple product I expect to be loaded on the PDP. Since the logic just grabs the 0 element of the product array, the bundled product is instead being displayed on the PDP even though the SLUG is the simple product's url_key.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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.

@herzog31 herzog31 added the bug Something isn't working label Jun 29, 2021
@mhaack
Copy link
Contributor

mhaack commented Jun 30, 2021

@brandonmaynard this LGTM but could you please add a test to cover that case as well. Thx.

Copy link
Contributor

@dplaton dplaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, see the unit test comment by @mhaack

@brandonmaynard
Copy link
Contributor Author

Hi @mhaack & @dplaton , thanks for reviewing. I added a small test class. When you have a chance, could you review again?

@codecov
Copy link

codecov bot commented Jul 2, 2021

Codecov Report

Merging #600 (1297f39) into master (0c0c6ba) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #600   +/-   ##
=========================================
  Coverage     88.28%   88.29%           
- Complexity     1367     1371    +4     
=========================================
  Files           254      254           
  Lines          6353     6358    +5     
  Branches        943      946    +3     
=========================================
+ Hits           5609     5614    +5     
  Misses          560      560           
  Partials        184      184           
Flag Coverage Δ
integration 64.26% <16.66%> (-0.10%) ⬇️
jest 85.34% <ø> (ø)
karma 94.83% <ø> (ø)
unittests 87.87% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...nts/models/retriever/AbstractProductRetriever.java 100.00% <100.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 0c0c6ba...1297f39. Read the comment docs.

@mhaack mhaack merged commit 520aab9 into adobe:master Jul 2, 2021
@mhaack
Copy link
Contributor

mhaack commented Jul 2, 2021

Verified. Thx @brandonmaynard for this contribution.

@mhaack mhaack added verified and removed To Verify labels Jul 2, 2021
@brandonmaynard
Copy link
Contributor Author

Thanks all

@brandonmaynard brandonmaynard deleted the bugfix/simple-product-pdp branch July 2, 2021 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants