Automated end-to-end acceptance tests for the wp-calypso client and WordPress.com.
- Overview
- Setup
- Test Environment
- Running tests on your machine
- Running tests on CI
- Writing tests
- Library objects
- Style Guide
- Patterns, Tricks, and Gotchas
- Debugging
- Troubleshooting
- Environment Variable
Calypso E2E requires the following:
- NodeJS 18.13.0 or higher
- TypeScript 4.5 or higher
- Playwright 1.28 or higher
- yarn 3.1 or higher
- install
homebrew
.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
- install
nvm
.
brew install nvm
- install the required nodeJS version.
nvm install <node_version>
- use the installed nodeJS version.
nvm use <node_version>
- enable
yarn
package manager.
corepack enable
- clone this repository
git clone https://github.com/Automattic/wp-calypso.git
- navigate to the cloned directory.
cd wp-calypso
From this point on, all commands are executed within the wp-calypso
root directory.
- install project dependencies.
yarn install
- obtain the secrets decryption key.
export E2E_SECRETS_KEY='Calypso E2E Config decode key from the Automattic secret store>'
- decrypt the secrets file.
yarn workspace wp-e2e-tests decrypt-secrets
- transpile the packages.
yarn workspace wp-e2e-tests build --watch
- run test.
yarn workspace wp-e2e-tests start -- <test_path>
Please refer to the Advanced Setup page.
Please refer to the Writing Tests and Style Guide pages.
Please refer to the Troubleshooting page, or ask at #kitkat.