A basic configuration template for running WordPress E2E tests using Playwright and WP Playground.
Install dependencies:
nvm install
npm install
npx playwright intstall
The server does not need to be manually started. A fresh instance will be provisioned by Playwright each time the tests are run. See the webServer
entry in playwright.config.ts
.
Run all tests:
npm run test:e2e
Run all tests in debug mode:
npm run test:e2e:debug
Run test with a specific browser:
npm run test:e2e:chromium # or firefox, or webkit.