Play Seats
Demo project for Playwright and e2e tests.
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/hug0-drelon/play-seats/archive/refs/heads/main.zipWordPress plugin that provides a dynamic Gutenberg block displaying the remaining seats for a play. The local environment includes a Twenty Twenty-Five child theme for the demonstration.
Requirements
- Node.js 24+
- PHP 8.4
- Docker (for
@wordpress/env) - Composer (installed automatically inside the wp-env development container)
Setup
npm install
npm run env:start
npm run env:composer -- update
npm run build
The development site is available at http://localhost:8888 (admin: admin / password).
Scripts
| Command | Description |
|---|---|
npm run build |
Compile front-end assets with @wordpress/scripts |
npm run start |
Watch mode for assets |
npm run env:start |
Start the development wp-env (port 8888) |
npm run env:stop |
Stop the development wp-env |
npm run env:test:start |
Start the test wp-env (port 8889) |
npm run env:test:stop |
Stop the test wp-env |
npm run env:start:all |
Start both development and test environments |
npm run env:stop:all |
Stop both development and test environments |
npm run env:composer -- <args> |
Run Composer in the plugin directory inside the development wp-env |
npm run env:test:composer -- <args> |
Run Composer in the plugin directory inside the test wp-env |
npm run lint:js |
ESLint |
npm run lint:php |
PHPCS and PHPStan (requires a running environment) |
npm run test:php |
PHPUnit integration tests (requires a running environment) |
npm run test:e2e |
Playwright |
Continuous integration
GitHub Actions runs ESLint, PHPCS, PHPStan, PHPUnit, and Playwright on every push and pull request. PHPUnit and E2E run in parallel and share the node_modules cache populated by the ESLint job.
Ressources
- Playwright documentation
- @wordpress/e2e-test-utils-playwright Gutenberg E2E test utilities
- WordPress Core migration to Playwright
- @wordpress/env reproducible local WordPress environment
- The practical test pyramid Martin Fowler on end-to-end tests
- Polylang E2E test suite real-world Playwright example
License
MIT