From d048ee4f5b5e7747ebdffdbcccf014aa61364a2a Mon Sep 17 00:00:00 2001 From: Matt Marsh Date: Thu, 23 May 2024 00:05:20 +0100 Subject: [PATCH] docs(cli): correct CLI grep documentation (#30940) The documentation for command line usage of `--grep` did not provide the correct string used for comparisons. This has now been fixed to include the project name. Fixes #30895 --- docs/src/test-cli-js.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/test-cli-js.md b/docs/src/test-cli-js.md index 4f012962fc..aa4430bd42 100644 --- a/docs/src/test-cli-js.md +++ b/docs/src/test-cli-js.md @@ -84,7 +84,7 @@ Complete set of Playwright Test options is available in the [configuration file] | `--fail-on-flaky-tests` | Fails test runs that contain flaky tests. By default flaky tests count as successes. | | `--forbid-only` | Whether to disallow `test.only`. Useful on CI.| | `--global-timeout ` | Total timeout for the whole test run in milliseconds. By default, there is no global timeout. Learn more about [various timeouts](./test-timeouts.md).| -| `-g ` or `--grep ` | Only run tests matching this regular expression. For example, this will run `'should add to cart'` when passed `-g "add to cart"`. The regular expression will be tested against the string that consists of the test file name, `test.describe` titles if any, test title and all test tags, separated by spaces, e.g. `my-test.spec.ts my-suite my-test @smoke`. The filter does not apply to the tests from dependency projects, i.e. Playwright will still run all tests from [project dependencies](./test-projects.md#dependencies). | +| `-g ` or `--grep ` | Only run tests matching this regular expression. For example, this will run `'should add to cart'` when passed `-g "add to cart"`. The regular expression will be tested against the string that consists of the project name, test file name, `test.describe` titles if any, test title and all test tags, separated by spaces, e.g. `chromium my-test.spec.ts my-suite my-test @smoke`. The filter does not apply to the tests from dependency projects, i.e. Playwright will still run all tests from [project dependencies](./test-projects.md#dependencies). | | `--grep-invert ` | Only run tests **not** matching this regular expression. The opposite of `--grep`. The filter does not apply to the tests from dependency projects, i.e. Playwright will still run all tests from [project dependencies](./test-projects.md#dependencies).| | `--headed` | Run tests in headed browsers. Useful for debugging. | | `--ignore-snapshots` | Whether to ignore [snapshots](./test-snapshots.md). Use this when snapshot expectations are known to be different, e.g. running tests on Linux against Windows screenshots. |