Closed buuhuu closed 2 years ago
Merging #939 (8bf6047) into master (6a0bdf3) will increase coverage by
0.00%
. The diff coverage is96.80%
.
@@ Coverage Diff @@
## master #939 +/- ##
=========================================
Coverage 89.66% 89.67%
+ Complexity 2134 2132 -2
=========================================
Files 346 346
Lines 9569 9616 +47
Branches 1377 1385 +8
=========================================
+ Hits 8580 8623 +43
- Misses 710 712 +2
- Partials 279 281 +2
Flag | Coverage Δ | |
---|---|---|
integration | 52.44% <0.00%> (-0.02%) |
:arrow_down: |
jest | 86.55% <91.17%> (+0.05%) |
:arrow_up: |
karma | 95.33% <100.00%> (+0.08%) |
:arrow_up: |
unittests | 88.71% <100.00%> (-0.04%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
react-components/src/utils/dataLayerUtils.js | 96.72% <ø> (ø) |
|
react-components/src/utils/useDataLayerEvents.js | 90.00% <83.33%> (-2.31%) |
:arrow_down: |
...models/v1/productcarousel/ProductCarouselBase.java | 95.65% <100.00%> (-4.35%) |
:arrow_down: |
...ls/v1/productcollection/ProductCollectionImpl.java | 97.14% <100.00%> (-2.86%) |
:arrow_down: |
...nents/BundleProductOptions/bundleProductOptions.js | 95.45% <100.00%> (+0.17%) |
:arrow_up: |
.../src/components/GiftCardOptions/giftCardOptions.js | 96.66% <100.00%> (+0.51%) |
:arrow_up: |
...c/components/GiftCardOptions/useGiftCardOptions.js | 85.71% <100.00%> (ø) |
|
...merce/product/v1/product/clientlib/js/addToCart.js | 91.22% <100.00%> (+0.48%) |
:arrow_up: |
...e/product/v1/product/clientlib/js/addToWishlist.js | 96.77% <100.00%> (+0.34%) |
:arrow_up: |
...merce/product/v3/product/clientlib/js/addToCart.js | 96.96% <100.00%> (+0.14%) |
:arrow_up: |
... and 6 more |
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 6a0bdf3...8bf6047. Read the comment docs.
Description
This change adds a
path
property to theeventInfo
object for thecif:addToCart
andcif:addToWishList
datalayer events.It includes in particular:
aem.cif.add-to-cart
andaem.cif.add-to-wishlist
are now dispatched on the target element the click originated from and bubble up to the listeners usually added to thedocument
. This allows us to find the data layer component for the event by looking at it's target element in a central place and we don't have to duplicate the logic to find the data layer component id in every place@id
Additionally this PR contains a minor change aligning the "enable add to wishlist controlled by cloud configuration default behaviour" of product carousel and product list with the other components.
Related Issue
CIF-2865 Fixes #855 Fixes https://github.com/adobe/aem-cif-guides-venia/issues/265
Motivation and Context
Consistency for add to cart and add to wishlist events
How Has This Been Tested?
Unit tests, locally
Screenshots (if appropriate):
Types of changes
Checklist: