docs: clarify what is passed as Test.grep input (#19153)

Fixes https://github.com/microsoft/playwright/issues/18669
This commit is contained in:
Yury Semikhatsky 2022-11-29 16:03:30 -08:00 committed by GitHub
parent b1b21bdac5
commit c9ec8b3e55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -138,7 +138,7 @@ You can configure entire test project to concurrently run all tests in all files
* since: v1.10
- type: ?<[RegExp]|[Array]<[RegExp]>>
Filter to only run tests with a title matching one of the patterns. For example, passing `grep: /cart/` should only run tests with "cart" in the title. Also available globally and in the [command line](../test-cli.md) with the `-g` option.
Filter to only run tests with a title matching one of the patterns. For example, passing `grep: /cart/` should only run tests with "cart" in the title. Also available globally and in the [command line](../test-cli.md) with the `-g` option. 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` option is also useful for [tagging tests](../test-annotations.md#tag-tests).

View file

@ -184,7 +184,8 @@ export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
/**
* Filter to only run tests with a title matching one of the patterns. For example, passing `grep: /cart/` should only
* run tests with "cart" in the title. Also available globally and in the [command line](https://playwright.dev/docs/test-cli) with the `-g`
* option.
* option. 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` option is also useful for [tagging tests](https://playwright.dev/docs/test-annotations#tag-tests).
*/
@ -4649,7 +4650,8 @@ interface TestProject {
/**
* Filter to only run tests with a title matching one of the patterns. For example, passing `grep: /cart/` should only
* run tests with "cart" in the title. Also available globally and in the [command line](https://playwright.dev/docs/test-cli) with the `-g`
* option.
* option. 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` option is also useful for [tagging tests](https://playwright.dev/docs/test-annotations#tag-tests).
*/