Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validating attachments to know if items should be split (#188)
#### What problem is this solving? When we update one item in cart from minicart, and if that item has attachments, currently the item will be duplicated in the list. With this fix the quantity on those items will be increased instead of duplicating the item. More details [here](https://projects-northlatam.atlassian.net/browse/LRP-330) <!--- What is the motivation and context for this change? --> #### How should this be manually tested? 1. Visit our [Test Workspace](https://web2--sebastiancervantes.myvtex.com) 2. Go to a PDP of a product that has subscriptions created ([Arroz Superior x 2 kg](https://web2--sebastiancervantes.myvtex.com/arroz-superior-x-2kg/p) is a good match) 3. Select more than one item and add subscription. ![image](https://github.com/vtex-apps/checkout-graphql/assets/75274040/4632b07b-88e6-4d06-b323-99446e667ab1) 4. Select frequency ![image](https://github.com/vtex-apps/checkout-graphql/assets/75274040/60bce025-17ea-45de-b1af-dcd97f3e5ee7) 5. Add to cart 6. In minicart, increase the item quantity ![image](https://github.com/vtex-apps/checkout-graphql/assets/75274040/9e7cebb8-03b9-48da-97eb-c64c09ffaaf3) **Result** Now we can see that the quantity increases correctly and the item is not duplicated as it was before the fix. ![image](https://github.com/vtex-apps/checkout-graphql/assets/75274040/dc53d501-ca4b-4725-85df-aa8a37cfede2) [Workspace](https://web2--sebastiancervantes.myvtex.com/arroz-superior-x-2kg/p) #### Checklist/Reminders - [ ] Updated `README.md`. - [ ] Updated `CHANGELOG.md`. - [ ✔️] Linked this PR to a Jira story (if applicable). - [ ] Updated/created tests (important for bug fixes). - [ ] Deleted the workspace after merging this PR (if applicable). #### Type of changes <!--- Add a ✔️ where applicable --> ✔️ | Type of Change ---|--- _ | Bug fix <!-- a non-breaking change which fixes an issue --> _ | New feature <!-- a non-breaking change which adds functionality --> _ | Breaking change <!-- fix or feature that would cause existing functionality to change --> ✔️| Technical improvements <!-- chores, refactors and overall reduction of technical debt -->
- Loading branch information