docs: quote to avoid variable expansion in powershell (#28728)
Fixes https://github.com/microsoft/playwright/issues/28724
This commit is contained in:
parent
e95b424b83
commit
87ca45366b
|
|
@ -79,35 +79,45 @@ test('Test full report @slow', async ({ page }) => {
|
||||||
|
|
||||||
You will then be able to run only that test:
|
You will then be able to run only that test:
|
||||||
|
|
||||||
```bash
|
```bash tab=bash-bash
|
||||||
|
npx playwright test --grep @fast
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell tab=bash-powershell
|
||||||
|
npx playwright test --grep "@fast"
|
||||||
|
```
|
||||||
|
|
||||||
|
```batch tab=bash-batch
|
||||||
npx playwright test --grep @fast
|
npx playwright test --grep @fast
|
||||||
```
|
```
|
||||||
|
|
||||||
Or if you want the opposite, you can skip the tests with a certain tag:
|
Or if you want the opposite, you can skip the tests with a certain tag:
|
||||||
|
|
||||||
```bash
|
```bash tab=bash-bash
|
||||||
npx playwright test --grep-invert @slow
|
npx playwright test --grep-invert @fast
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell tab=bash-powershell
|
||||||
|
npx playwright test --grep-invert "@fast"
|
||||||
|
```
|
||||||
|
|
||||||
|
```batch tab=bash-batch
|
||||||
|
npx playwright test --grep-invert @fast
|
||||||
```
|
```
|
||||||
|
|
||||||
To run tests containing either tag (logical `OR` operator):
|
To run tests containing either tag (logical `OR` operator):
|
||||||
|
|
||||||
```bash
|
```bash tab=bash-bash
|
||||||
npx playwright test --grep "@fast|@slow"
|
npx playwright test --grep "@fast|@slow"
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows shells:
|
```powershell tab=bash-powershell
|
||||||
|
npx playwright test --grep --% "@fast^|@slow"
|
||||||
|
```
|
||||||
|
|
||||||
- PowerShell
|
```batch tab=bash-batch
|
||||||
|
npx playwright test --grep "@fast^|@slow"
|
||||||
```bash
|
```
|
||||||
npx playwright test --grep --% "@fast^|@slow"
|
|
||||||
```
|
|
||||||
|
|
||||||
- Command Prompt(cmd.exe) / Git Bash:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx playwright test --grep "@fast^|@slow"
|
|
||||||
```
|
|
||||||
|
|
||||||
Or run tests containing both tags (logical `AND` operator) using regex lookaheads:
|
Or run tests containing both tags (logical `AND` operator) using regex lookaheads:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue