-
Notifications
You must be signed in to change notification settings - Fork 72
[E2E] [QIT] Add Jetpack connection support for QIT E2E tests #11049
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
base: dev/qit-e2e-foundation
Are you sure you want to change the base?
Conversation
0b2290d
to
ebb5a08
Compare
0c4df2c
to
f187c98
Compare
18924a5
to
bd1afc7
Compare
…nce setup functions, and add connection validation tests
1475a9f
to
307ef0f
Compare
307ef0f
to
e3064e3
Compare
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 873 kB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got 2 tests that failed.
QIT report: https://qit.woo.com/?qit_results=4886709.kMG2Aaw8PtWU586tsbSYa5z2BFMtuzpBuOLdQYmHhTDrYHMmTYX6KMbvlH5CIoP2
test store: https://spoonbill-of-roadrunners.jurassic.ninja/
creds 391ec-pb/
console output 391ed-pb/
2 failed
[test] Payments (Run) › woocommerce-payments/local/basic.spec.js:54:5 › Verify WooCommerce Payments plugin activation
[test] Payments (Run) › woocommerce-payments/local/checkout.spec.js:15:2 › WooPayments Connection Status › should verify WooPayments is connected (not showing Connect screen)
Thanks for the review @rtio!
I noticed the Maybe there's something with this specific test site 🤔 ? I'm taking a look, thanks for sharing your credentials! |
I tried a new run, using the https://spoonbill-of-roadrunners.jurassic.ninja/ tokens and it passed this time. https://qit.woo.com/?qit_results=4890881.GrnxJ6y846wUZxGIeesBsTvvVWRTJrXfGfTLdXmoNlcWUtvsEbBG05T805wRGS6A |
Fixes #WOOPMNT-5336
Changes proposed in this Pull Request
This is a stacked PR that builds on top of the basic QIT E2E testing functionality to address the key challenge of establishing a Jetpack connection for WooPayments in test environments.
The previous foundation established basic E2E testing infrastructure, but lacked the ability to connect WooPayments to a real test account via Jetpack. This PR solves that by providing automated Jetpack connection setup for already onboarded test accounts.
Key features:
WP-CLI QIT Development Commands: New
WP_CLI_QIT_Dev_Command
class providing:wp woopayments qit_jetpack_connection
- Configures Jetpack connection for pre-onboarded test siteswp woopayments qit_jetpack_status
- Shows connection status for debuggingEnhanced E2E Test Runner: Updated
e2e-runner.sh
with:Connection Validation Tests:
Configuration Management:
Why This Approach:
The added WP-CLI commands do essentially the same thing as the WCPay Dev Tools plugin we use for current E2E tests. Initially I tried using the dev plugin directly, but downloading and installing it in the QIT environment proved tricky. This workaround was inspired by @dmvrtx's work in #10811. However, initializing a test drive account turned out to be complex, so I opted to use an already onboarded account instead. This follows the same approach as our current E2E tests, adapted for QIT's needs. The WP-CLI commands are loaded via
wp eval-file
in the QIT container and never ship to production, keeping test infrastructure completely isolated from production code. Recent Refactoring: The bootstrap setup has been refactored for better clarity and maintainability:./e2e/bootstrap:/qit/bootstrap:ro
) provides cleaner paths in setup scriptsqit-jetpack-connection.php
andqit-jetpack-status.php
qit_jetpack_connection
andqit_jetpack_status
to clearly indicate their QIT-specific purposeTesting instructions
Prerequisites:
composer install
)tests/qit/config/default.env
totests/qit/config/local.env
Running the tests:
npm run test:qit-e2e
npm run changelog
to add a changelog file, choosepatch
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.Post merge