Skip to content
Merged
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
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: npm run build

- name: Start wp-env
run: npm run wp-env start
run: npm run wp-env-test start

- name: Install Playwright browsers
run: npx playwright install --with-deps
Expand All @@ -86,7 +86,7 @@ jobs:

- name: Stop wp-env
if: always()
run: npm run wp-env stop
run: npm run wp-env-test stop

local-json-multisite:
name: Local JSON Multisite Integration
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jspm_packages/
.env.test
.env.production
.wp-env.override.json
.wp-env.test.override.json

# MacOS
.DS_Store
Expand Down
11 changes: 2 additions & 9 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"$schema": "https://schemas.wp.org/trunk/wp-env.json",
"plugins": ["."],
"env": {
"tests": {
"mappings": {
"wp-content/plugins/secure-custom-fields": ".",
"wp-content/plugins/scf-test-plugins": "./tests/e2e/plugins"
}
}
}
"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": ["."],
"config": {
"WP_DEBUG": false,
"SCRIPT_DEBUG": false
},
"mappings": {
"wp-content/plugins/secure-custom-fields": ".",
"wp-content/plugins/scf-test-plugins": "./tests/e2e/plugins"
}
}
10 changes: 6 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
```bash
# Setup
npm install && composer install
npm run wp-env status # Always check status first
npm run wp-env start # Only start if not already running
npm run wp-env status # Always check status first (dev site, port 8888)
npm run wp-env start # Only start if not already running
npm run wp-env-test status # E2E test site (port 8889)
npm run wp-env-test start # Only start if not already running

# Development
npm run watch # Development with watch
Expand All @@ -28,7 +30,7 @@ npm run build # Production build

## Testing instructions

> **Note**: PHP/E2E tests require wp-env running.
> **Note**: E2E tests require the test environment running (`npm run wp-env-test start`).

```bash
# PHP (requires wp-env)
Expand All @@ -43,7 +45,7 @@ composer test:phpstan # Static analysis only
npm run test:unit # Jest unit tests
npm run test:unit:watch # Jest in watch mode

# End-to-end tests (Playwright, requires wp-env)
# End-to-end tests (Playwright, requires `npm run wp-env-test start`)
# IMPORTANT: NEVER run `npx playwright test` directly — always use these npm scripts:
npm run test:e2e # All E2E tests
npm run test:e2e:debug # Debug mode
Expand Down
22 changes: 22 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const wordpressConfig = require( '@wordpress/scripts/config/eslint.config.cjs' );

module.exports = [
{
ignores: [
'node_modules/**',
'vendor/**',
'wordpress/**',
'assets/build/**',
'coverage/**',
'.nyc_output/**',
'.php-coverage/**',
'artifacts/**',
'test-results/**',
'playwright-report/**',
'blob-report/**',
'release/**',
'**/.claude/**',
],
},
...wordpressConfig,
];
Loading
Loading