Make WordPress Core


Ignore:
Timestamp:
10/13/2023 08:11:41 AM (12 months ago)
Author:
swissspidy
Message:

Build/Test Tools: Migrate Puppeteer tests to Playwright.

As per the migration plan shared last year, this migrates all browser-based tests in WordPress core to use Playwright.
This includes end-to-end, performance, and visual regression tests.

Props swissspidy, mamaduka, kevin940726, bartkalisz, desrosj, adamsilverstein.
Fixes #59517.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/e2e/README.md

    r51904 r56926  
    66## Running the tests
    77
    8 The e2e tests require a production-like environment to run. By default, they will assume an environment is available at `http://localhost:8889`, with username=admin and password=password.
     8The e2e tests require a production-like environment to run. By default, they will assume an environment is available at `http://localhost:8889`, with username `admin` and password `password`.
    99
    1010If you don't already have an environment ready, you can set one up by following [these instructions](https://github.com/WordPress/wordpress-develop/blob/master/README.md).
     
    2121
    2222```
    23 npm run test:e2e -- --wordpress-base-url=http://mycustomurl --wordpress-username=username --wordpress-password=password
     23WP_BASE_URL=http://mycustomurl WP_USERNAME=username WP_PASSWORD=password npm run test:e2e
    2424```
    2525**DO NOT run these tests in an actual production environment, as they will delete all your content.**
    2626
    27 For debugging purposes, you might want to follow the test visually. You can do so by running the tests in an interactive mode.
     27For debugging purposes, you might want to follow the test visually. You can do so by running the tests in an interactive mode:
    2828
    2929```
    30 npm run test:e2e -- --puppeteer-interactive
     30npm run test:e2e -- --ui
    3131```
     32
     33[UI Mode](https://playwright.dev/docs/test-ui-mode) let's you explore, run and debug tests with a time travel experience complete with watch mode.
     34All test files are loaded into the testing sidebar where you can expand each file and describe block to individually run, view, watch and debug each test.
    3235
    3336You can also run a single test file separately:
     
    4245* Block Editor Handbook end to end testing overview: https://developer.wordpress.org/block-editor/contributors/code/testing-overview/#end-to-end-testing
    4346
    44 * Gutenberg e2e-test-utils package API docs: https://github.com/WordPress/gutenberg/tree/trunk/packages/e2e-test-utils
     47* Gutenberg e2e-test-utils-playwright package API docs: https://github.com/WordPress/gutenberg/tree/trunk/packages/e2e-test-utils-playwright
    4548
    46 * Puppeteer API docs: https://github.com/puppeteer/puppeteer#readme (the version we are using is indicated in the @wordpress/scripts package: https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/package.json)
     49* Playwright API docs: https://playwright.dev/docs (the version we are using is indicated in the `@wordpress/scripts` package: https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/package.json)
Note: See TracChangeset for help on using the changeset viewer.