John Blackbourn 784e60bb5a Security: Always include the no-store and private directives in the Cache-Control header when setting headers that prevent caching.
The intention of these headers is to prevent any form of caching, whether that's in the browser or in an intermediate cache such as a proxy server. These directives instruct an intermediate cache to not store the response in their cache for any user – not just for logged-in users.

This does not affect the caching behaviour of assets within a page such as images, CSS, and JavaScript files.

Props kkmuffme, devansh2002, johnbillion.

Fixes #61942

git-svn-id: https://develop.svn.wordpress.org/trunk@59724 602fd350-edb4-49c9-b593-d223f7449a82
2025-01-28 23:20:48 +00:00
..

E2E Tests

End-To-End (E2E) tests for WordPress.

Running the tests

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.

If you don't already have an environment ready, you can set one up by following these instructions.

Then you can launch the tests by running:

npm run test:e2e

which will run the test suite using a headless browser.

If your environment has a different url, username or password to the default, you can provide the base URL, username and password like this:

WP_BASE_URL=http://mycustomurl WP_USERNAME=username WP_PASSWORD=password npm run test:e2e

DO NOT run these tests in an actual production environment, as they will delete all your content.

For debugging purposes, you might want to follow the test visually. You can do so by running the tests in an interactive mode:

npm run test:e2e -- --ui

UI Mode let's you explore, run and debug tests with a time travel experience complete with watch mode. All 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.

You can also run a single test file separately:

npm run test:e2e tests/e2e/specs/hello.test.js

Documentation