Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
ebb5a08
Add QIT development tools and E2E testing setup
mgascam Sep 16, 2025
bd1afc7
Remove QIT development tools and simplify E2E test setup for WooComme…
mgascam Sep 17, 2025
c30457d
Refactor QIT development tools for WooPayments: update comments, enha…
mgascam Sep 16, 2025
e3064e3
Add E2E test credentials and enhance WooPayments setup scripts
mgascam Sep 17, 2025
ff3ff3b
Add GitHub Actions workflow for QIT E2E tests
mgascam Sep 17, 2025
acbf4fe
Enhance security for token handling in CI workflow
mgascam Sep 17, 2025
d87f97a
Add changelog
mgascam Sep 18, 2025
0359bc7
Amend comment
mgascam Sep 18, 2025
9de0e5d
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Sep 18, 2025
34e488a
Use QIT E2E secrets
mgascam Sep 18, 2025
ffe04a1
Add changelog
mgascam Sep 18, 2025
0e2b1c9
Remove wrongly committed files
mgascam Sep 18, 2025
a3d157d
Amend comment
mgascam Sep 18, 2025
4600402
Whitelist subscriptions core package to fix the build error
mgascam Sep 18, 2025
63abbe8
Add a step to install QIT
mgascam Sep 18, 2025
3a5e6b7
Refactor QIT CLI installation and update test command syntax in E2E s…
mgascam Sep 18, 2025
f4f436b
Fix qit command error
mgascam Sep 18, 2025
cceb6f9
Refactor QIT E2E test execution and streamline environment variable h…
mgascam Sep 18, 2025
07efbd5
Update QIT E2E test command to use correct paths and environment vari…
mgascam Sep 18, 2025
c12814c
Remove upload step
mgascam Sep 18, 2025
020c053
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 18, 2025
af5f4b3
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Sep 22, 2025
e6b2e0f
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Sep 22, 2025
ff1439d
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 22, 2025
797ec4d
Revert changes to composer.*
mgascam Sep 22, 2025
6114d8f
Upgrade qit cli package
mgascam Sep 22, 2025
9023c4a
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Sep 22, 2025
79cb164
Restore composer files
mgascam Sep 22, 2025
c4d211e
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 22, 2025
e1bc769
Add 'tests/qit/e2e' to path ignore patterns in Jest config
mgascam Sep 23, 2025
97c0335
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Sep 23, 2025
ff6a72d
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 23, 2025
5c33c7f
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Sep 24, 2025
34dd024
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Sep 24, 2025
55fb917
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 24, 2025
c252170
Add wp-cli-stubs dependency and update psalm-loader for static analysis
mgascam Sep 24, 2025
1f941ec
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Sep 24, 2025
b6abfbf
Migrate basic.spec.ts
mgascam Sep 29, 2025
4c04db1
Migrate shopper-checkout-purchase with ctp disabled
mgascam Sep 29, 2025
78b3787
Migrate shopper-checkout-purchase with card testing protection enabled
mgascam Sep 29, 2025
46baa33
Migrate shopper-wc-blocks-checkout-purchase.spec.ts
mgascam Sep 29, 2025
3dc5e92
Migrate shopper-checkout-failures.spec.ts
mgascam Sep 29, 2025
9c7dcd9
Migrate shopper-wc-blocks-checkout-failures
mgascam Sep 29, 2025
0554ada
Migrate shopper-checkout-save-card-and-purchase spec
mgascam Sep 29, 2025
7c610e1
Add auth fixture and use it in basic spec
mgascam Sep 30, 2025
7939c85
Use auth fixture in shopper checkout spec
mgascam Sep 30, 2025
959866a
Use auth fixture in blocks purchase
mgascam Sep 30, 2025
071dd82
Use auth fixture in the shopper-checkout-failures.spec
mgascam Sep 30, 2025
4cc7717
Use auth fixture in shopper-wc-blocks-checkout-failures
mgascam Sep 30, 2025
0782a34
Use auth fixture in shopper-checkout-save-card-and-purchase spec
mgascam Sep 30, 2025
a9e85fa
Migrate shopper-wc-blocks-saved-card-checkout-and-usage spec
mgascam Sep 30, 2025
88e2bd8
Migrate shopper-pay-for-order. spec
mgascam Sep 30, 2025
4686bf3
Migrate shopper-checkout-purchase-site-editor spec
mgascam Sep 30, 2025
9b2709c
Migrate shopper-checkout-cart-coupon spec
mgascam Sep 30, 2025
d6bc8fd
Migrate shopper-myaccount-payment-methods-add-fail spec
mgascam Sep 30, 2025
8ebb645
Migrate shopper-checkout-purchase-with-upe-methods spec
mgascam Sep 30, 2025
299e7f0
MIgrate klarna-checkout-purchase spec
mgascam Sep 30, 2025
de4ac98
Migrate alipay-checkout-purchase spec
mgascam Sep 30, 2025
d98f588
Migrate shopper-bnpls-checkout spec
mgascam Sep 30, 2025
4269615
Migrate multi-currency-checkout spec
mgascam Sep 30, 2025
d1c7fda
Migrate shopper-multi-currency-widget spec
mgascam Sep 30, 2025
39c3487
Increase timeout for beforeAll in shopper multi-currency widget spec
mgascam Sep 30, 2025
2c3a159
WIP: Migrate shopper-myaccount-saved-cards.spec.ts
mgascam Sep 30, 2025
2874e31
MIgrate shopper-myaccount-saved-cards spec
mgascam Sep 30, 2025
ef2d9ea
Support running single spec
mgascam Oct 1, 2025
506c1b1
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Oct 1, 2025
d53a75a
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Oct 1, 2025
13faa5d
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 1, 2025
300f674
Merge branch 'dev/qit-e2e-workflows' into dev/qit-e2e-shopper-specs-m…
mgascam Oct 1, 2025
02348e5
Refine plugin row locator to exclude update rows in activation test
mgascam Oct 1, 2025
673c891
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Oct 1, 2025
77ce07c
Rename misspelled vars on env file
mgascam Oct 1, 2025
2a47236
WIP non admin wp admin access
mgascam Oct 1, 2025
016e1c8
Migrate non-admin-wp-admin-access spec
mgascam Oct 1, 2025
334f651
Migrate merchant-payment-settings-manual-capture.spec.ts
mgascam Oct 2, 2025
f5ab382
Refactor non-admin WP-Admin access tests to streamline context creation
mgascam Oct 2, 2025
5023917
Migrate woopay-setup spec
mgascam Oct 2, 2025
8c0eb03
Migrate multi-currency-setup spec
mgascam Oct 2, 2025
45bf014
Migrate merchant-admin-deposits spec
mgascam Oct 2, 2025
cf73eb2
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Oct 2, 2025
c712e4c
Migrate merchant-admin-transactions spec
mgascam Oct 2, 2025
69bdbd0
Migrate merchant-admin-analytics spec
mgascam Oct 2, 2025
90e9655
Migrate merchant-admin-disputes spec
mgascam Oct 2, 2025
2843c8e
Migrate merchant-admin-account-balance spec
mgascam Oct 2, 2025
3a4729f
Migrate multi-currency-on-boarding
mgascam Oct 2, 2025
a752472
Migrate multi-currency spec
mgascam Oct 2, 2025
2254b90
Migrate merchant-orders-manual-capture spec
mgascam Oct 2, 2025
700b051
Migrate merchant-orders-full-refund spec
mgascam Oct 2, 2025
9af00dc
Migrate merchant-orders-partial-refund spec
mgascam Oct 2, 2025
2e3f2e9
Migrate merchant-multi-currency-widget spec
mgascam Oct 3, 2025
986f522
Migrate merchant-disputes-view-details-via-order-notice spec
mgascam Oct 3, 2025
c7ebf74
Migrate merchant-orders-status-change spec
mgascam Oct 3, 2025
cae35c7
Migrate merchant-orders-refund-failures spec
mgascam Oct 3, 2025
d90662b
Migrate merchant-disputes-respond spec
mgascam Oct 3, 2025
2cb051a
Refactor merchant-disputes-respond spec to use createDisputedOrder he…
mgascam Oct 3, 2025
ebdcc7c
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 3, 2025
7eb756c
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Oct 3, 2025
c3134c8
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 3, 2025
b9054fc
Merge branch 'dev/qit-e2e-workflows' into dev/qit-e2e-shopper-specs-m…
mgascam Oct 6, 2025
3c034ec
Refactor E2E runner script to improve path handling and default spec …
mgascam Oct 6, 2025
5800720
Add shopper tags to E2E tests for improved categorization
mgascam Oct 6, 2025
0f03c07
Merge branch 'dev/qit-e2e-shopper-specs-migration' into dev/qit-e2e-m…
mgascam Oct 6, 2025
fedd697
Refactor tests to include merchant tags
mgascam Oct 6, 2025
7737e2c
Migrate shopper-subscriptions-purchase-sign-up-fee spec
mgascam Oct 6, 2025
fb8e0c7
Migrate shopper-subscriptions-purchase-sign-up-fee
mgascam Oct 6, 2025
af13a8e
Migrate shopper-subscriptions-purchase-multiple-subscriptions
mgascam Oct 7, 2025
e1a6245
Migrate shopper-subscriptions-purchase-free-trial spec
mgascam Oct 7, 2025
66498bc
WIP shopper-subscriptions-manage-payments
mgascam Oct 7, 2025
9cd5d6e
Migrate shopper-subscriptions-manage-payments
mgascam Oct 7, 2025
07ff3cb
Migrate merchant-subscriptions-settings
mgascam Oct 7, 2025
088c119
Migrate merchant-subscriptions-renew spec
mgascam Oct 7, 2025
666824f
Wip migrate merchant-subscriptions-renew-action-scheduler
mgascam Oct 7, 2025
55615a5
Migrate merchant-subscriptions-renew-action-scheduler
mgascam Oct 7, 2025
c272505
Refactor subscription tests to remove legacy test guards
mgascam Oct 7, 2025
ff8fe09
Refactor E2E tests to remove conditional describe and use consistent …
mgascam Oct 7, 2025
0989ba8
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Oct 7, 2025
c5506bf
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Oct 7, 2025
b1935f7
WIP refactor cli commands
mgascam Oct 7, 2025
220ecbb
Refactor QIT Jetpack connection setup and status scripts
mgascam Oct 7, 2025
1ec81fa
Remove wp-cli-stubs dependency from composer.json and psalm-loader.php
mgascam Oct 7, 2025
d180a65
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 7, 2025
b54f1c8
Merge branch 'dev/qit-e2e-workflows' into dev/qit-e2e-shopper-specs-m…
mgascam Oct 7, 2025
e2e92c8
Merge branch 'dev/qit-e2e-shopper-specs-migration' into dev/qit-e2e-m…
mgascam Oct 7, 2025
2dc0888
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 7, 2025
b2b59d2
Update setup paths for subscription products and adjust QIT volume mo…
mgascam Oct 7, 2025
783be6b
Update QIT bootstrap volume path in configuration
mgascam Oct 7, 2025
947fe37
Merge branch 'dev/qit-e2e-shopper-specs-migration' into dev/qit-e2e-m…
mgascam Oct 7, 2025
32f192f
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 8, 2025
ffd7e59
Migrate shopper-myaccount-renew-subscription spec
mgascam Oct 8, 2025
81c0c67
Update woocommerce-subscriptions plugin reference in QIT configuration
mgascam Oct 8, 2025
c68c5ae
Refactor QIT setup scripts: remove WordPress importer installation an…
mgascam Oct 8, 2025
33a294c
Add safety checks for JetPack commands and update environment setup s…
mgascam Oct 8, 2025
d9ea91d
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 8, 2025
8c7db83
Merge branch 'dev/qit-e2e-workflows' into dev/qit-e2e-shopper-specs-m…
mgascam Oct 8, 2025
b455ce9
Merge branch 'dev/qit-e2e-shopper-specs-migration' into dev/qit-e2e-m…
mgascam Oct 8, 2025
1e0a889
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 8, 2025
5822362
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Oct 8, 2025
24f5fce
Merge branch 'develop' into dev/qit-e2e-foundation
mgascam Oct 10, 2025
9f25161
Merge branch 'dev/qit-e2e-foundation' into dev/qit-e2e-basic-checkout
mgascam Oct 10, 2025
991e3fe
Merge branch 'dev/qit-e2e-basic-checkout' into dev/qit-e2e-workflows
mgascam Oct 10, 2025
e16aa7e
Merge branch 'dev/qit-e2e-workflows' into dev/qit-e2e-shopper-specs-m…
mgascam Oct 10, 2025
cc5ba36
Merge branch 'dev/qit-e2e-shopper-specs-migration' into dev/qit-e2e-m…
mgascam Oct 10, 2025
f7e7d90
Merge branch 'dev/qit-e2e-merchant-specs-migration' into dev/qit-e2e-…
mgascam Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions .github/workflows/qit-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: QIT E2E Tests

on:
pull_request:
paths:
- 'client/**'
- 'includes/**'
- 'src/**'
- 'tests/qit/e2e/**'
- 'tests/qit/qit.yml'
- '.github/workflows/qit-e2e.yml'
push:
branches:
- 'develop'
- 'trunk'
- 'dev/qit-e2e-*' # Allow testing on QIT E2E development branches
schedule:
# Run daily at 2 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
inputs:
woocommerce_version:
description: 'WooCommerce version to test against'
required: false
default: 'stable'
type: choice
options:
- 'stable'
- '8.9.3'
- '7.7.0'
- 'rc'
- 'beta'
php_version:
description: 'PHP version'
required: false
default: '8.3'
type: choice
options:
- '8.3'
- '8.2'
- '8.1'
- '7.4'
run_ui_mode:
description: 'Run tests in UI mode for debugging'
required: false
default: false
type: boolean

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
qit-e2e-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Pull requests: Test against stable and L-1 WooCommerce versions
- wc_version: "stable"
php_version: "8.3"
test_group: "basic"
- wc_version: "8.9.3" # L-1 version
php_version: "8.3"
test_group: "basic"
# Full runs: Include business continuity version
- wc_version: "7.7.0"
php_version: "7.4"
test_group: "basic"

steps:
- name: "Checkout repository"
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: "Set up repository"
uses: ./.github/actions/setup-repo

- name: "Build the plugin"
id: build_plugin
uses: ./.github/actions/build

- name: "Install QIT CLI for running tests"
run: |
# Install dev dependencies to get QIT CLI
composer install --optimize-autoloader

- name: Authenticate QIT
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
run: ./vendor/bin/qit partner:add --user='${{ secrets.QIT_CI_USER }}' --application_password='${{ secrets.QIT_CI_SECRET }}'

- name: Set test options
id: test_options
run: |
OPTIONS=""
if [[ "${{ inputs.run_ui_mode }}" == "true" ]]; then
OPTIONS="${OPTIONS} --ui"
fi

# Use input versions if provided, otherwise use matrix
WC_VERSION="${{ inputs.woocommerce_version || matrix.wc_version }}"
PHP_VERSION="${{ inputs.php_version || matrix.php_version }}"

OPTIONS="${OPTIONS} --php_version=${PHP_VERSION} --woo=${WC_VERSION}"

echo "options=${OPTIONS}" >> $GITHUB_OUTPUT
echo "Will run with options: ${OPTIONS}"

- name: Mask sensitive values
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
run: |
# Mask tokens in GitHub Actions logs to prevent accidental exposure
echo "::add-mask::${{ secrets.E2E_QIT_JP_SITE_ID }}"
echo "::add-mask::${{ secrets.E2E_QIT_JP_BLOG_TOKEN }}"
echo "::add-mask::${{ secrets.E2E_QIT_JP_USER_TOKEN }}"

- name: Run QIT Tests
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
run: |
cd tests/qit
../../vendor/bin/qit run:e2e woocommerce-payments ./e2e \
--source ../../woocommerce-payments.zip \
--env E2E_JP_SITE_ID="${{ secrets.E2E_QIT_JP_SITE_ID }}" \
--env E2E_JP_BLOG_TOKEN="${{ secrets.E2E_QIT_JP_BLOG_TOKEN }}" \
--env E2E_JP_USER_TOKEN="${{ secrets.E2E_QIT_JP_USER_TOKEN }}" \
${{ steps.test_options.outputs.options }}
5 changes: 5 additions & 0 deletions changelog/dev-qit-e2e-foundation
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Add foundation to run E2E tests with QIT and basic tests.


5 changes: 5 additions & 0 deletions changelog/dev-qit-e2e-workflows
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Add Github workflows to run E2E tests in CI


2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"cweagans/composer-patches": "1.7.1",
"automattic/jetpack-changelogger": "3.3.2",
"spatie/phpunit-watcher": "1.23.6",
"woocommerce/qit-cli": "0.4.0",
"woocommerce/qit-cli": "0.10.0",
"slevomat/coding-standard": "8.15.0",
"dg/bypass-finals": "1.5.1",
"sirbrillig/phpcs-variable-analysis": "^2.11",
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"test:qit-phpstan": "npm run build:release && ./tests/qit/phpstan.sh",
"test:qit-phpstan-local": "npm run build:release && ./tests/qit/phpstan.sh --local",
"test:qit-malware": "npm run build:release && ./tests/qit/malware.sh --local",
"test:qit-e2e": "./tests/qit/e2e-runner.sh",
"watch": "webpack --watch",
"hmr": "webpack server",
"start": "npm run watch",
Expand Down
2 changes: 2 additions & 0 deletions tests/js/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = {
'<rootDir>/.*/build-module/',
'<rootDir>/docker/',
'<rootDir>/tests/e2e',
'<rootDir>/tests/qit/e2e',
],
watchPathIgnorePatterns: [
'/node_modules/',
Expand All @@ -54,6 +55,7 @@ module.exports = {
'<rootDir>/.*/build-module/',
'<rootDir>/docker/',
'<rootDir>/tests/e2e',
'<rootDir>/tests/qit/e2e',
],
transform: {
...tsjPreset.transform,
Expand Down
20 changes: 17 additions & 3 deletions tests/qit/config/default.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Create `local.env` and supply actual values.
QIT_USER=""
QIT_PASSWORD=""
# QIT Configuration for WooCommerce Payments
# Copy this file to local.env and update with your values

# ===========================================
# QIT CLI CREDENTIALS (for security, phpstan, malware, custom e2e tests)
# ===========================================
QIT_USER=your_qit_username
QIT_PASSWORD=your_qit_application_password

# ===========================================
# E2E TEST CREDENTIALS (optional - for basic connectivity testing)
# ===========================================
# These provide basic WooPayments plugin connectivity for E2E tests
E2E_JP_SITE_ID=your_site_id_here
E2E_JP_BLOG_TOKEN=your_blog_token_here
E2E_JP_USER_TOKEN=your_user_token_here

Loading
Loading