Skip to content

Latest commit

 

History

History

e2e

Abstract concept

WordPress.com End to End Tests

Automated end-to-end acceptance tests for the wp-calypso client and WordPress.com.

Resources

Prerequisites

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.

Quick start

  1. install homebrew.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
  1. install nvm.
brew install nvm
  1. install the required nodeJS version.
nvm install <node_version>
  1. use the installed nodeJS version.
nvm use <node_version>
  1. enable yarn package manager.
corepack enable
  1. clone this repository
git clone https://github.com/Automattic/wp-calypso.git
  1. navigate to the cloned directory.
cd wp-calypso

From this point on, all commands are executed within the wp-calypso root directory.

  1. install project dependencies.
yarn install
  1. obtain the secrets decryption key.
export E2E_SECRETS_KEY='Calypso E2E Config decode key from the Automattic secret store>'
  1. decrypt the secrets file.
yarn workspace wp-e2e-tests decrypt-secrets
  1. transpile the packages.
yarn workspace wp-e2e-tests build --watch
  1. run test.
yarn workspace wp-e2e-tests test -- <test_path>

Advanced setup

Please refer to the Advanced Setup page.

Contribute to E2E tests

Please refer to the Writing Tests and Style Guide pages.

Troubleshooting

Please refer to the Troubleshooting page.