IMPORTANT: First follow the "get started" section of the monorepo.
- Docker Desktop (or a local docker installation)
- pnpm
- npx
npx --version
- If not found, install with
npm install -g npx
This plugin uses wp-env for local development and testing.
- After running
pnpm install
andpnpm turbo build
from the base monorepo directory, you can start the local WordPress environment. - From the
plugins/sitebuider
folder, runpnpm run env:dev
and wait for Docker to complete initializing the site. - Navigate your browser to
http://localhost:8888/wp-admin/
- Username: admin
- Password: password
- Create a
.env
file in the root of the project - Add the following value according to your local setup, to the
.env
file:
MIX_PROXY_URL=sitebuilder-dev.local
pnpm run watch
This plugin uses a combination of Playwright and wp-env to perform automated end-to-end testing in a browser. Before running the testing the first time, you'll need to install the browsers playwright needs.
# To only install Chrome which is used by default
npx playwright install chromium
OR
# To install all browsers (Chrome, Firefox, Webkit)
npx playwright install
Start the local WordPress dev and testing environments
pnpm run env:dev
Run the test suite
pnpm run env:test