Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Start wp-env and install PCOV
env:
PHP_COVERAGE_ENABLED: true
run: npm run wp-env start
run: npm run wp-env-test start

- name: Install Playwright browsers
run: npx playwright install --with-deps
Expand Down Expand Up @@ -113,4 +113,4 @@ jobs:

- name: Stop wp-env
if: always()
run: npm run wp-env stop
run: npm run wp-env-test stop
15 changes: 2 additions & 13 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"plugins": ["."],
"lifecycleScripts": {
"afterStart": "bash ./scripts/install-pcov.sh"
},
"env": {
"tests": {
"mappings": {
"wp-content/plugins/secure-custom-fields": ".",
"wp-content/plugins/scf-test-plugins": "./tests/e2e/plugins",
"wp-content/mu-plugins/php-coverage-collector.php": "./tests/e2e/mu-plugins/php-coverage-collector.php"
}
}
}
"testsEnvironment": false,
"plugins": ["."]
}
14 changes: 14 additions & 0 deletions .wp-env.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"testsEnvironment": false,
"port": 8889,
"plugins": ["."],
"lifecycleScripts": {
"afterStart": "bash ./scripts/install-pcov.sh"
},
"mappings": {
"wp-content/plugins/secure-custom-fields": ".",
"wp-content/plugins/scf-test-plugins": "./tests/e2e/plugins",
"wp-content/mu-plugins/php-coverage-collector.php": "./tests/e2e/mu-plugins/php-coverage-collector.php"
}
}
8 changes: 4 additions & 4 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"test:unit": "wp-scripts test-unit-js",
"test:unit:watch": "wp-scripts test-unit-js --watch",
"watch": "webpack --watch",
"wp-env": "wp-env"
"wp-env": "wp-env",
"wp-env-test": "wp-env --config .wp-env.test.json"
},
"dependencies": {
"@wordpress/icons": "^10.26.0",
Expand All @@ -31,7 +32,7 @@
"@testing-library/react": "^14.1.2",
"@wordpress/dependency-extraction-webpack-plugin": "^6.20.0",
"@wordpress/e2e-test-utils-playwright": "^1.20.0",
"@wordpress/env": "^10.39.0",
"@wordpress/env": "^11.0.0",
"@wordpress/icons": "^10.26.0",
"@wordpress/prettier-config": "^4.22.0",
"@wordpress/priority-queue": "^3.22.0",
Expand Down
Loading