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 at the version in the root package.json "engines" field. (Typically latest LTS.)
- The yarn version available in the repo.
- Dependencies such as Typescript and Playwright are installed via yarn, and you can find information about the versions we use in ./package.json.
- 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 test -- <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.