fix(pdp): redirect to cart page on mobile after edge add-to-cart#718
Open
dylandepass wants to merge 3 commits into
Open
fix(pdp): redirect to cart page on mobile after edge add-to-cart#718dylandepass wants to merge 3 commits into
dylandepass wants to merge 3 commits into
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
On mobile the header cart badge update is too subtle — users don't notice the item was added and mash the button. After a successful edge-checkout add-to-cart on viewports < 900px, redirect to the cart page. Adds Cart.flush() to force a synchronous localStorage write before the redirect, avoiding a race where the debounced persist (300ms) hasn't fired yet.
dylandepass
force-pushed
the
mobile-atc-redirect
branch
from
July 16, 2026 15:43
c6e7f29 to
e006fe7
Compare
Contributor
Author
|
/run-tests |
|
❌ Integration tests failed. 🔍 Check the workflow run for details |
paypal-express.spec.js crashed with 'window is not defined' because importing paypal-context.js transitively loaded checkout-order.js → commerce-api.js → commerce-config.js, which reads window.location at the top level. Extracts isEstimateExpiringSoon into scripts/estimate-token.js so paypal-context.js no longer drags in the commerce stack. checkout-order.js re-exports the function for backward compatibility.
dylandepass
force-pushed
the
mobile-atc-redirect
branch
from
July 16, 2026 16:23
c362142 to
7ace7b8
Compare
Contributor
Author
|
/run-tests |
|
❌ Integration tests failed. 🔍 Check the workflow run for details |
Contributor
Author
|
/run-tests |
|
❌ Integration tests failed. 🔍 Check the workflow run for details |
…ests Mobile add-to-cart now redirects to the cart page, so Playwright tests running at mobile viewports can no longer wait for the button to re-enable. Updated clickAndWait helpers to race the button re-enable against a /order/cart navigation and navigate back to the PDP when the redirect fires.
dylandepass
force-pushed
the
mobile-atc-redirect
branch
from
July 16, 2026 17:46
b6d0565 to
6d4e01e
Compare
Contributor
Author
|
/run-tests |
|
❌ Integration tests failed. 🔍 Check the workflow run for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On mobile the header cart badge update is too subtle — users don't notice the item was added and mash the button. After a successful edge-checkout add-to-cart on viewports < 900px, redirect to the cart page. Adds Cart.flush() to force a synchronous localStorage write before the redirect, avoiding a race where the debounced persist (300ms) hasn't fired yet.
Also fixes a pre-existing test failure where
paypal-express.spec.jscrashed with "window is not defined" — extractsisEstimateExpiringSoonintoscripts/estimate-token.jsto break the transitive import chain intocommerce-config.js.Test URLs: