Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: grep for project dependencies (#28299)
Yury Semikhatsky2b4d51b1e844
diff --git a/docs/src/test-cli-js.md b/docs/src/test-cli-js.mdindex 99176626c6..e005c53714 100644--- a/docs/src/test-cli-js.md+++ b/docs/src/test-cli-js.md@@ -84,8 +84,8 @@ Complete set of Playwright Test options is available in the [configuration file]| `-c <file>` or `--config <file>`| Configuration file. If not passed, defaults to `playwright.config.ts` or `playwright.config.js` in the current directory. || `-c <dir>` or `--config <dir>`| Configuration file. If not passed, defaults to `playwright.config.ts` or `playwright.config.js` in the current directory. || `--forbid-only` | Whether to disallow `test.only`. Useful on CI.|-| `-g <grep>` or `--grep <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` name (if any) and the test name divided by spaces, e.g. `my-test.spec.ts my-suite my-test`. |-| `--grep-invert <grep>` | Only run tests **not** matching this regular expression. The opposite of `--grep`. |+| `-g <grep>` or `--grep <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` name (if any) and the test name divided by spaces, e.g. `my-test.spec.ts my-suite my-test`. The filter does not apply to the tests from dependcy projects, i.e. Playwright will still run all tests from [project dependencies](./test-projects.md#dependencies). |+| `--grep-invert <grep>` | Only run tests **not** matching this regular expression. The opposite of `--grep`. The filter does not apply to the tests from dependcy projects, i.e. Playwright will still run all tests from [project dependencies](./test-projects.md#dependencies).|| `--global-timeout <number>` | Total timeout for the whole test run in milliseconds. By default, there is no global timeout. Learn more about [various timeouts](./test-timeouts.md).|| `--list` | list all the tests, but do not run them.|| `--max-failures <N>` or `-x`| Stop after the first `N` test failures. Passing `-x` stops after the first failure.|diff --git a/docs/src/test-projects-js.md b/docs/src/test-projects-js.mdindex 88b1ec0161..d401ae9c20 100644--- a/docs/src/test-projects-js.md+++ b/docs/src/test-projects-js.md@@ -214,6 +214,9 @@ You can also teardown your setup by adding a [`property: TestProject.teardown`]<img style={{display: 'flex', margin: 'auto'}} alt="global setup and teardown" loading="lazy" src="https://github.com/microsoft/playwright/assets/13063165/dfcf10a9-f601-4d0c-bd8d-9490e6efbf7a" />+### Test filtering++If `--grep/--grep-invert` [option](./test-cli.md#reference) is used, test file name filter is specified in [command line](./test-cli.md) or [test.only()](./api/class-test.md#test-only) is used, the will only apply to the tests from the deepest projects in the project dependency chain. In other words, if a matching test belongs to a project that has project dependencies, Playwright will run all the tests from the project depdencies ignoring the filters.## Custom project parameters