Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
106bb04
Update playwright.yml according to test-playwright.yml
mishautkin Mar 6, 2026
4d40b5c
Move and merge `package.json` files to the root folder
mishautkin Mar 9, 2026
b3fe683
Move .env.example, tsconfig, wo-env to root folder
mishautkin Mar 9, 2026
dee9f5c
Move/update **..ignore** files
mishautkin Mar 9, 2026
e120318
Move playwright.config to root folder
mishautkin Mar 9, 2026
94afdfa
Fix paths to e2e helper plugins in `resources/` dir
mishautkin Mar 9, 2026
774485c
Move README.md to E2E-TESTS.md in root folder
mishautkin Mar 9, 2026
014128a
Lint fix
mishautkin Mar 9, 2026
6abd834
Fic e2e helper plugin file name
mishautkin Mar 9, 2026
d656eec
Fix playwright.yml
mishautkin Mar 9, 2026
5d45889
Fix playwright.yml - remove WORK_DIR
mishautkin Mar 9, 2026
1321bb2
Fix playwright.yml - remove tests/qa from ARTIFACT_PATH
mishautkin Mar 9, 2026
541bac6
Fix scripts in package.json
mishautkin Mar 9, 2026
3e725bc
Fix path in .wp-env.json
mishautkin Mar 9, 2026
9c2246d
Fix playwright.yml - path for tested .zip
mishautkin Mar 9, 2026
5abf868
Fix woocommerceSubscriptionsPlugin name
mishautkin Mar 9, 2026
c36da35
Update playwright-utils to v5.0.0
mishautkin Mar 9, 2026
cb3b0ef
Update playwright-utils to v5.0.0 (lock files)
mishautkin Mar 9, 2026
c5e7ce4
Cosmetic updates in playwright.yml
mishautkin Mar 12, 2026
02c3bdc
Remove PACKAGE_VERSION input from playwright.yml
mishautkin Mar 23, 2026
2746282
Add critical surcharge tests
mishautkin Mar 23, 2026
3118122
Add critical subscription tests
mishautkin Mar 23, 2026
01bcefe
Fix updated hosted checkout locators
mishautkin Mar 23, 2026
f4b61b4
Fix package title in playwright.yml
mishautkin Mar 25, 2026
51caa8d
Fix PHPStan warnings at level 5
Biont Mar 31, 2026
0896a9c
Update PHPStan configuration: add excluded node_modules paths, remove…
Biont Mar 31, 2026
c40ff53
Fix phpcs
Biont Mar 31, 2026
270630b
Fix phpcs (after disabling reformat on commit in IDE lol)
Biont Mar 31, 2026
d7defeb
Merge pull request #1180 from mollie/dev/qa/add-critical-tests
Biont Apr 1, 2026
626df4c
Fix PHPStan warnings for level 6
Biont Apr 1, 2026
54664d4
Fix PHPStan warnings for level 6
Biont Apr 1, 2026
88ad159
Merge branch 'dev/develop' into dev/qa/e2e-ci
Biont Apr 1, 2026
dd02884
Update `.idea` configurations and dependency versions for project mai…
Biont Apr 1, 2026
527b25b
Update Playwright workflow to use `e2e:setup:hosts` for default host …
Biont Apr 1, 2026
a2beb17
Update Playwright workflow: add pull request trigger and default test…
Biont Apr 1, 2026
20fb07d
Simplify Playwright workflow: use silent `zip` and remove redundant `…
Biont Apr 1, 2026
644d69f
Update Playwright workflow: fix CLI container name for site URL confi…
Biont Apr 1, 2026
44cb3e6
Update Playwright workflow: encapsulate file operations and update CL…
Biont Apr 1, 2026
e8378b6
Remove unused plugin exports from QA resources index
Biont Apr 1, 2026
cfffb10
Update Playwright workflow: comment out pull request trigger
Biont Apr 2, 2026
a3b3181
Update order actions filters and fix incorrect hook usage
Biont Apr 2, 2026
a756f27
Update Playwright workflow: add private composer repo and install Woo…
Biont Apr 2, 2026
4c7f22d
Update Playwright workflow: add Composer auth secret
Biont Apr 2, 2026
2c3b6e3
Add .gitkeep to QA resources plugins folder
Biont Apr 2, 2026
6e7dfdc
Update lockfile
Biont Apr 2, 2026
29acb28
Merge pull request #1174 from mollie/dev/qa/e2e-ci
Biont Apr 2, 2026
fb3d323
Merge branch 'dev/develop' into dev/PIWOO-714-introduce-phpstan
Biont Apr 2, 2026
f949deb
Merge branch 'dev/PIWOO-714-introduce-phpstan' into dev/PIWOO-714-int…
Biont Apr 2, 2026
e5b757f
Update lockfile
Biont Apr 2, 2026
c02c47a
Update code style
Biont Apr 2, 2026
edfd86c
Fix borked docblocks
Biont Apr 2, 2026
8089ebf
Merge branch 'dev/PIWOO-714-introduce-phpstan-at-level-5' into dev/PI…
Biont Apr 2, 2026
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
8 changes: 6 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ node_modules/
.babelrc
.composer_compiled_assets
.editorconfig
.env.example
.idea/
.psalm/
wp-cli.yml
.env.example-e2e
.env.integration.example
.eslintignore
.wp-env.json
playwright.config.ts
tsconfig.json
wp-cli.yml
54 changes: 27 additions & 27 deletions tests/qa/.env.example → .env.example.e2e
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# MUtkin test singlesite, PHP 8.1
# playwright-utils config
IGNORE_HTTPS_ERRORS=false
WP_BASE_URL='https://test.com'
WP_USERNAME=***
WP_PASSWORD=***
WP_BASIC_AUTH_USER=
WP_BASIC_AUTH_PASS=
STORAGE_STATE_PATH='./storage-states'
STORAGE_STATE_PATH_ADMIN='./storage-states/admin.json'
# WooCommerce API config
WC_API_KEY=
WC_API_SECRET=
# Mollie
MOLLIE_LIVE_API_KEY=
MOLLIE_TEST_API_KEY=
# Tested Mollie API method: order or payment (is applied by default)
MOLLIE_API_METHOD=payment # change to order for execution with Order API
IS_MULTISTEP_CHECKOUT='false'
# Testrail
TESTRAIL_URL=
TESTRAIL_USERNAME=
TESTRAIL_PASSWORD=
TESTRAIL_PLAN_ID=
# MUtkin test singlesite, PHP 8.1
# playwright-utils config
IGNORE_HTTPS_ERRORS=false
WP_BASE_URL='https://test.com'
WP_USERNAME=***
WP_PASSWORD=***
WP_BASIC_AUTH_USER=
WP_BASIC_AUTH_PASS=
STORAGE_STATE_PATH='./storage-states'
STORAGE_STATE_PATH_ADMIN='./storage-states/admin.json'

# WooCommerce API config
WC_API_KEY=
WC_API_SECRET=

# Mollie
MOLLIE_LIVE_API_KEY=
MOLLIE_TEST_API_KEY=
# Tested Mollie API method: order or payment (is applied by default)
MOLLIE_API_METHOD=payment # change to order for execution with Order API
IS_MULTISTEP_CHECKOUT='false'

# Testrail
TESTRAIL_URL=
TESTRAIL_USERNAME=
TESTRAIL_PASSWORD=
TESTRAIL_PLAN_ID=
TESTRAIL_RUN_ID=
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
- name: Run PHPUnit
run: ./vendor/bin/phpunit

- name: Run Psalm
run: ./vendor/bin/phpstan analyze
- name: Run PHPStan
run: ./vendor/bin/phpstan analyze --error-format=github

- name: Run PhpCS
run: ./vendor/bin/phpcs -n --parallel=2 --runtime-set ignore_warnings_on_exit 1
85 changes: 46 additions & 39 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,90 +3,97 @@ name: E2E Tests
on:
workflow_dispatch:
inputs:
PACKAGE_VERSION:
description: 'Package Version'
TEST_SUITE:
description: 'Test suite'
required: true
default: 'critical'
type: choice
options:
- critical
- ngrok
- all
- refund
PLAYWRIGHT_CLI_ARGS:
description: 'Arguments for `npx playwright test` (if set "Test suite" will be ignored)'
required: false
type: string
- e2e:test:critical
- e2e:test:refund
- e2e:test:all
# pull_request:
# branches: [dev/develop]
# paths:
# - 'src/**'
# - 'lib/**'
# - 'public/**'
# - 'package.json'
# - 'composer.json'

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

jobs:
build:
name: Build Mollie package
name: Build tested plugin package
uses: inpsyde/reusable-workflows/.github/workflows/build-and-distribute.yml@main
secrets:
GITHUB_USER_EMAIL: ${{ secrets.DEPLOYBOT_EMAIL }}
GITHUB_USER_NAME: ${{ secrets.DEPLOYBOT_USER }}
GITHUB_USER_SSH_KEY: ${{ secrets.DEPLOYBOT_SSH_PRIVATE_KEY }}
GITHUB_USER_SSH_PUBLIC_KEY: ${{ secrets.DEPLOYBOT_SSH_PUBLIC_KEY }}
NPM_REGISTRY_TOKEN: ${{ secrets.DEPLOYBOT_GITHUB_TOKEN_PACKAGES }}
with:
PACKAGE_VERSION: ${{ inputs.PACKAGE_VERSION }}
PACKAGE_NAME: mollie-payments-for-woocommerce
NODE_VERSION: 22

e2e-playwright:
name: Run Playwright E2E Tests for Mollie
name: Run Playwright E2E Tests
needs: build
uses: inpsyde/reusable-workflows/.github/workflows/test-playwright.yml@fix/test-playwright
strategy:
matrix:
php: [ '8.2' ]
with:
WORK_DIR: 'tests/qa'
SCRIPT_NAME: ${{ inputs.PLAYWRIGHT_CLI_ARGS && '' || format('test:{0}', inputs.TEST_SUITE) }}
PLAYWRIGHT_CLI_ARGS: ${{ inputs.PLAYWRIGHT_CLI_ARGS || '' }}
PLAYWRIGHT_SCRIPT: ${{ inputs.TEST_SUITE || 'e2e:test:critical' }}
ARTIFACT_PATH: |
tests/qa/artifacts/*
tests/qa/playwright-report/
tests/qa/test-results/
artifacts/*
playwright-report/
test-results/
ARTIFACT_INCLUDE_HIDDEN_FILES: true
COMPOSER_DEPS_INSTALL: false
PHP_VERSION: ${{ matrix.php }}
NODE_VERSION: 22
NODE_VERSION: 24
PLAYWRIGHT_BROWSER_ARGS: 'chromium --with-deps'

PRE_SCRIPT: |
# 1. Download and unzip the built plugin
gh run download ${{ github.run_id }} -p "mollie-payments-for-woocommerce-*" -D resources/files
(cd resources/files && mv mollie-payments-for-woocommerce-*/mollie-payments-for-woocommerce . && zip -r mollie-payments-for-woocommerce.zip mollie-payments-for-woocommerce && rm -rf mollie-payments-for-woocommerce mollie-payments-for-woocommerce-*/)
gh run download ${{ github.run_id }} -p "mollie-payments-for-woocommerce-*" -D tests/qa/resources/files
(
cd tests/qa/resources/files
mv mollie-payments-for-woocommerce-*/mollie-payments-for-woocommerce .
zip -rq mollie-payments-for-woocommerce.zip mollie-payments-for-woocommerce
rm -rf mollie-payments-for-woocommerce mollie-payments-for-woocommerce-*/
)

# 2. Add private composer repository and download WooCommerce Subscriptions
composer config repositories.repo-name composer https://repo.packagist.com/inpsyde/payment-gateways/
composer require inpsyde-mirror/woocommerce-subscriptions

# 2. Setup wp-env
npm run setup:env
# 3. Setup wp-env default hosts
npm run e2e:setup:hosts

# 3. Install ngrok
# 4. Install ngrok
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null
echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list
sudo apt-get update && sudo apt-get install -y ngrok

# 4. Configure ngrok auth (token is in .env.ci via ENV_FILE_DATA)
ngrok config add-authtoken $(grep NGROK_AUTHTOKEN .env.ci | cut -d'=' -f2)
# 5. Configure ngrok auth (token sourced from .env.ci)
ngrok config add-authtoken $NGROK_AUTHTOKEN

# 5. Start ngrok tunnel in background (tests environment port 80)
# 6. Start ngrok tunnel in background (tests environment port 80)
ngrok http 80 --log=stdout --log-level=info > /tmp/ngrok.log 2>&1 &

# 6. Wait for tunnel to be ready and grab the public URL
# 7. Wait for tunnel to be ready and grab the public URL
sleep 3
NGROK_URL=$(curl -s http://127.0.0.1:4040/api/tunnels | jq -r '.tunnels[] | select(.proto=="https") | .public_url')
echo "Ngrok URL: $NGROK_URL"

# 7. Update WordPress site URLs to ngrok (tests environment)
npx wp-env run tests-cli wp config set WP_SITEURL "$NGROK_URL"
npx wp-env run tests-cli wp config set WP_HOME "$NGROK_URL"
# 8. Update WordPress site URLs to ngrok (tests environment)
wp-env run tests-cli wp config set WP_SITEURL "$NGROK_URL"
wp-env run tests-cli wp config set WP_HOME "$NGROK_URL"

# 8. Override WP_BASE_URL for Playwright
# 9. Override WP_BASE_URL for Playwright
sed -i "s|WP_BASE_URL=.*|WP_BASE_URL=$NGROK_URL|" .env.ci
secrets:
ENV_FILE_DATA: ${{ secrets.ENV_FILE_DATA }}
NPM_REGISTRY_TOKEN: ${{ secrets.DEPLOYBOT_GITHUB_TOKEN_PACKAGES }}
NPM_REGISTRY_TOKEN: ${{ secrets.DEPLOYBOT_GITHUB_TOKEN_PACKAGES }}
COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }}

25 changes: 15 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
.idea
.vscode
/dist
/*.zip
/nbproject
/vendor/
/coverage/
/node_modules/
node_modules
/.idea/dataSources.xml
/.idea/docker-compose.xml
/.idea/dictionaries/
Expand All @@ -17,13 +19,16 @@
/tools/
/build/
/tests/e2e/Shared/default.json
.env
cypress.json
test-results/
playwright-report/
/test-results/
/playwright-report/
/playwright/.cache/
/test-results/
/playwright-report/
/playwright/.cache/
test-results*
playwright-report*
playwright/.cache
playwright-utils
storage-states
test-results*
playwright-wordpress-credentials.json
woocommerce-subscriptions*.zip
mollie-payments-for-woocommerce*.zip
.env*
!.env.example*
!package-lock.json
20 changes: 20 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"testsPort": 80,
"config": {
"WP_HOME": "http://mywp.site",
"WP_SITEURL": "http://mywp.site"
},
"phpVersion": "8.0",
"plugins": [
"./tests/qa/resources/e2e-snippets"
],
"mappings": {
"wp-cli.yml": "./tests/qa/wp-cli.yml",
"wp-content/plugins": "./tests/qa/resources/plugins",
"wp-content/files": "./tests/qa/resources/files"
},
"lifecycleScripts": {
"afterStart": "node tests/qa/bin/test-env-setup.js",
"afterClean": "node tests/qa/bin/test-env-clean.js"
}
}
Loading
Loading