Skip to content

[E2E][QIT] Add remaining merchant E2E test specs to QIT test-package#11221

Merged
mgascam merged 99 commits intodevelopfrom
dev/qit-merchant-tests-pr3
Jan 9, 2026
Merged

[E2E][QIT] Add remaining merchant E2E test specs to QIT test-package#11221
mgascam merged 99 commits intodevelopfrom
dev/qit-merchant-tests-pr3

Conversation

@mgascam
Copy link
Contributor

@mgascam mgascam commented Dec 22, 2025

Follows up on #11209

Changes proposed in this Pull Request

This PR completes the merchant E2E test migration by adding the remaining 12 specs to the QIT test-package infrastructure.

Why is this needed?
PR #11209 added the first batch of 7 merchant specs (order-related tests). This PR adds the remaining 12 specs as mentioned in that PR: disputes, multi-currency, analytics, and woopay tests.

Specs included in this PR:

  • merchant-admin-analytics.spec.ts - Analytics page tests
  • merchant-admin-deposits.spec.ts - Deposits page tests
  • merchant-admin-disputes.spec.ts - Disputes listing tests
  • merchant-admin-transactions.spec.ts - Transactions page tests
  • merchant-disputes-respond.spec.ts - Dispute response workflow tests
  • merchant-disputes-view-details-via-order-notice.spec.ts - Dispute details via order notice
  • merchant-multi-currency-widget.spec.ts - Multi-currency widget tests
  • multi-currency-on-boarding.spec.ts - Multi-currency onboarding flow
  • multi-currency-setup.spec.ts - Multi-currency setup tests
  • multi-currency.spec.ts - General multi-currency tests
  • non-admin-wp-admin-access.spec.ts - Non-admin user access tests
  • woopay-setup.spec.ts - WooPay setup tests

Additional improvements:

  • Enhanced utility functions in utils/merchant.ts for reliability
  • Various test stability fixes (dialog handling, form state waits, regex-based verification)
  • Updated README with troubleshooting documentation

Testing instructions

Refer to tests/qit/README.md for setup instructions.

# Run all merchant tests by project
npm run test:qit-e2e -- -- --project=merchant

# Run all merchant tests by tag
npm run test:qit-e2e -- -- --grep "@merchant"

# Run specific test file
npm run test:qit-e2e -- -- merchant-disputes-respond.spec.ts

All tests should pass ✅


  • Run npm run changelog to add a changelog file, choose patch to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.
  • Covered with tests (or have a good reason not to test in description ☝️) - This PR adds E2E tests
  • Tested on mobile (or does not apply) - Does not apply (E2E test infrastructure)

Post merge

🤖 Generated with Claude Code

mgascam and others added 30 commits December 3, 2025 10:50
Migrates 8 shopper test specs to QIT:

My Account:
- My account payment methods add failures
- My account saved cards management

Multicurrency & Pay for Order:
- Multi-currency checkout
- Multi-currency widget
- Pay for order flow

Alternative Payment Methods:
- Alipay checkout purchase
- Klarna checkout purchase
- BNPLs (Buy Now Pay Later) checkout

Tests cover shopper flows for account management, currency
switching, and alternative payment methods.
- Alipay: Disable multi-currency before tests (like Klarna does)
- Alipay: Use URL check for redirect instead of page text
- Pay for order: Handle both 'card was declined' and 'payment was not processed' errors
Alipay payments require specific Stripe account configuration that
is not available in the QIT test environment. The payment method can
be enabled in settings but checkout fails with 'Invalid or missing
payment details'.
The QIT devtools implementation uses WP-CLI to set options directly,
but the card testing protection feature relies on filters/hooks from
the Dev Tools plugin (option_wcpay_account_data, woocommerce_payments_account_refreshed)
that aren't available in the QIT environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The dev-trunk version of qit-cli requires PHP 7.4+, which conflicts
with the config.platform.php setting of 7.3.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mgascam mgascam requested review from a team December 23, 2025 20:20
@mgascam
Copy link
Contributor Author

mgascam commented Jan 8, 2026

Hi 👋 @Automattic/gamma @Automattic/masamune gentle ping on this PR in case it got buried.
It follows the same approach as the previously approved PRs, with no fundamental changes. Thanks!

Copy link
Contributor

@frosso frosso left a comment

Choose a reason for hiding this comment

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

No major concerns.

However, the tests/woopayments/merchant/non-admin-wp-admin-access.spec.ts test consistently fails, even when run singularly.

Image

@mgascam
Copy link
Contributor Author

mgascam commented Jan 8, 2026

However, the tests/woopayments/merchant/non-admin-wp-admin-access.spec.ts test consistently fails, even when run singularly.

Thanks for the review @frosso!. This is now fixed. QIT report: https://qit.woo.com/?qit_results=4951235.UMK8Hbnq7yeVLWeZ4LEZOvDsq0VCpEgEvCyomNtHe4GXSGnl4XEMWPxTUxRq24rX

FYI It was also failing in the non-QIT E2E test for the same reason: a recent server-side change, you can find more details here #11241

Copy link
Contributor

@frosso frosso left a comment

Choose a reason for hiding this comment

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

Thank you @mgascam, for also looking into and fixing the test! 💪 Looking great!

@mgascam mgascam enabled auto-merge January 9, 2026 08:41
@mgascam mgascam added this pull request to the merge queue Jan 9, 2026
Merged via the queue into develop with commit e769b0b Jan 9, 2026
36 checks passed
@mgascam mgascam deleted the dev/qit-merchant-tests-pr3 branch January 9, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants