test(cypress): add payment method UI state and billing address validation#1430
Open
test(cypress): add payment method UI state and billing address validation#1430
Conversation
…tion tests Adds connector-agnostic E2E tests for payment element rendering correctness, payment method switching state, mobile viewport layout, and billing address field collection/validation. Covers layout regression from PR #1348. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changed Files
|
Contributor
🔍 Code Review by opencodeStatus: ✅ Approved with Minor Suggestions 📋 SummaryAdds comprehensive Cypress E2E tests for:
2 new test files, 696 lines total. Pure test addition - no source code changes. ✅ What's Good
💡 Suggestions (Non-blocking)1. Reduce arbitrary wait times (33 occurrences of cy.wait(2000))
cy.intercept("GET", "**/account/payment_methods*").as("paymentMethods");
cy.wait("@paymentMethods"); // Instead of cy.wait(2000)2. Expiry input typing (Lines 94-97, 172-175) // Current (may not work correctly):
.type(card_exp_month);
.type(card_exp_year);
// Better:
.type(`${card_exp_month}${card_exp_year}`);3. Test data consistency
|
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.
Type of Change
Description
Adds connector-agnostic E2E tests for payment element rendering correctness, payment method switching state, mobile viewport layout, and billing address field collection/validation. Covers layout regression from PR #1348.
How did you test it?
Test Scenarios
1. Payment Method Selection UI — Rendering
2. Payment Method Selection UI — Multi-Method State
addNewCardtab renders to access full payment method listaddNewCardis clicked3. Payment Method Selection UI — Loading & Mobile Viewport
payment_methodsis loading(simulate with 3s delayed intercept)
iPhone X (375×812)
iPhone 14 (390×844)
4. Billing Address Validation
How was this tested?
cypress run --spec "cypress/e2e/payment-method-selection-ui-e2e-test.cy.ts,cypress/e2e/billing-address-validation-e2e-test.cy.ts"Checklist
npm run re:build