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

fix: Consider shouldSplitItem value from ValidateCart mutation response #2528

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lucasfp13
Copy link
Contributor

@lucasfp13 lucasfp13 commented Oct 25, 2024

What's the purpose of this pull request?

This PR intends to fix the behavior of shouldSplitItem value sent by through the ValidateCart mutation.

Currently, the variable value is being overridden after some mutation calls due to its value not being sent back in the mutation response, so with these changes we will consider the same value set in the store config.

How to test it?

Perform actions that triggers the ValidateCart mutation (open/close the cart, add/remove items to/from the cart) and check if the shouldSplitItem variable is being sent on the payload and if its value is corresponding to the one set in the store config.

Starters Deploy Preview

References

Issue: #2426

@lucasfp13 lucasfp13 self-assigned this Oct 25, 2024
Copy link

vercel bot commented Oct 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2024 7:39pm

@lucasfp13 lucasfp13 added the don't merge Blocked by some reason - - Please mention the reason label Oct 25, 2024
Copy link

codesandbox-ci bot commented Oct 25, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@lucasfp13 lucasfp13 force-pushed the fix/consider-should-split-item-from-mutation-response branch from e0da991 to 325e02e Compare November 4, 2024 19:34
@lucasfp13 lucasfp13 changed the title fix: Consider shouldSplitItem from ValidateCart mutation response fix: Consider shouldSplitItem value from ValidateCart mutation response Nov 4, 2024
@lucasfp13 lucasfp13 added bug Something isn't working and removed don't merge Blocked by some reason - - Please mention the reason labels Nov 4, 2024
@lucasfp13 lucasfp13 marked this pull request as ready for review November 4, 2024 19:56
@lucasfp13 lucasfp13 requested a review from a team as a code owner November 4, 2024 19:56
Copy link
Contributor

@hellofanny hellofanny left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

I've tested in the starter: vtex-sites/starter.store#600
The shouldSplitItem variable is being sent on the payload as expected ✅

discovery.config.js payload
session { Pasted Graphic

after cleaning the cache,I've tried setting shouldSplitItem: false

discovery.config.js payload
addressType null, Pasted Graphic 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants