WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@yashranaway
Copy link
Contributor

Add system tests for Apple Pay/Google Pay checkout

Fixes #2173

Summary

Adds system tests for Apple Pay/Google Pay checkout flows with mocked Stripe payment request API.

Changes

Added
spec/requests/checkout/apple_pay_google_pay_spec.rb

Verified

Payment method selection works correctly
No duplicate Pay buttons appear
Error handling when payment unavailable

@yashranaway
Copy link
Contributor Author

@binary-koan i have reponed #2182 with the fixes

@yashranaway
Copy link
Contributor Author

I updated the mock to support simulating a payment failure, so the tests now explicitly click the button and assert that the 'Sorry, something went wrong' error message is displayed. LMK if anything is wrong, thankyou

Copy link
Contributor

@binary-koan binary-koan left a comment

Choose a reason for hiding this comment

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

Just tried this out and it doesn't work locally because the checkout is a full page load that wipes out the mock value. Could you check if there's a workaround?

@yashranaway
Copy link
Contributor Author

@binary-koan

I moved the mock injection to after add_to_cart so it runs on the checkout page after navigation completes.
I can't test locally due to webpack build errors affecting all system specs - could you please verify this works on your end?

@EmCousin
Copy link
Contributor

EmCousin commented Dec 5, 2025

@binary-koan I'm assigning this to you since you're already involved in it - it also helps me track which PR still await for review. However let me know if you prefer a different way of tracking PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add e2e specs for Apple Pay and Google Pay

3 participants