docs: fix the nunit example (#6978)

This commit is contained in:
Pavel Feldman 2021-06-08 19:14:18 -07:00 committed by GitHub
parent ff3f951dc8
commit 521153844a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 20 deletions

View file

@ -77,7 +77,7 @@ cd PlaywrightTests
Install dependencies, build project and download necessary browsers. This is only done once per project. Install dependencies, build project and download necessary browsers. This is only done once per project.
```bash ```bash
dotnet add package Microsoft.Playwright dotnet add package Microsoft.Playwright.NUnit
dotnet build dotnet build
playwright install playwright install
``` ```

View file

@ -37,7 +37,7 @@ test('basic test', async ({ page }) => {
Running: Running:
```bash ```bash
npx playwright test -c tests npx playwright test
``` ```
👉 Read more in [testrunner documentation](./test-intro.md). 👉 Read more in [testrunner documentation](./test-intro.md).

View file

@ -52,25 +52,25 @@ test('basic test', async ({ page }) => {
Now run your tests, assuming that test files are in the `tests` directory. Now run your tests, assuming that test files are in the `tests` directory.
```bash ```bash
npx playwright test -c tests npx playwright test
``` ```
Playwright Test just ran a test using Chromium browser, in a headless manner. Let's tell it to use headed browser: Playwright Test just ran a test using Chromium browser, in a headless manner. Let's tell it to use headed browser:
```bash ```bash
npx playwright test -c tests --headed npx playwright test --headed
``` ```
What about other browsers? Let's run the same test using Firefox: What about other browsers? Let's run the same test using Firefox:
```bash ```bash
npx playwright test -c tests --browser=firefox npx playwright test --browser=firefox
``` ```
And finally, on all three browsers: And finally, on all three browsers:
```bash ```bash
npx playwright test -c tests --browser=all npx playwright test --browser=all
``` ```
Refer to [configuration](./test-configuration.md) section for configuring test runs in different modes with different browsers. Refer to [configuration](./test-configuration.md) section for configuring test runs in different modes with different browsers.
@ -283,7 +283,7 @@ drwxr-xr-x 3 user group 96 Jun 4 11:46 example.spec.ts-snapshots
To update your golden files, you can use the `--update-snapshots` parameter. To update your golden files, you can use the `--update-snapshots` parameter.
```bash ```bash
npx playwright test -c tests --update-snapshots npx playwright test --update-snapshots
``` ```
@ -293,61 +293,61 @@ Here are the most common options available in the [command line](./test-cli.md).
- Run tests in headed browsers - Run tests in headed browsers
```bash ```bash
npx playwright test -c tests --headed npx playwright test --headed
``` ```
- Run tests in a particular browser - Run tests in a particular browser
```bash ```bash
npx playwright test -c tests --browser=webkit npx playwright test --browser=webkit
``` ```
- Run tests in all browsers - Run tests in all browsers
```bash ```bash
npx playwright test -c tests --browser=all npx playwright test --browser=all
``` ```
- Run a single test file - Run a single test file
```bash ```bash
npx playwright test -c tests tests/todo-page.spec.ts npx playwright test tests/todo-page.spec.ts
``` ```
- Run a set of test files - Run a set of test files
```bash ```bash
npx playwright test -c tests tests/todo-page/ tests/landing-page/ npx playwright test tests/todo-page/ tests/landing-page/
``` ```
- Run a test with specific title - Run a test with specific title
```bash ```bash
npx playwright test -c tests -g "add a todo item" npx playwright test -g "add a todo item"
``` ```
- Run tests [in parallel](./test-parallel.md) - that's the default - Run tests [in parallel](./test-parallel.md) - that's the default
```bash ```bash
npx playwright test -c tests npx playwright test
``` ```
- Disable [parallelization](./test-parallel.md) - Disable [parallelization](./test-parallel.md)
```bash ```bash
npx playwright test -c tests --workers=1 npx playwright test --workers=1
``` ```
- Choose a [reporter](./test-reporters.md) - Choose a [reporter](./test-reporters.md)
```bash ```bash
npx playwright test -c tests --reporter=dot npx playwright test --reporter=dot
``` ```
- Run in debug mode with [Playwright Inspector](./inspector.md) - Run in debug mode with [Playwright Inspector](./inspector.md)
```bash ```bash
# Linux/macOS # Linux/macOS
PWDEBUG=1 npx playwright test -c tests PWDEBUG=1 npx playwright test
# Windows with cmd.exe # Windows with cmd.exe
set PWDEBUG=1 set PWDEBUG=1
npx playwright test -c tests npx playwright test
# Windows with PowerShell # Windows with PowerShell
$env:PWDEBUG=1 $env:PWDEBUG=1
npx playwright test -c tests npx playwright test
``` ```
## Create a configuration file ## Create a configuration file

View file

@ -72,7 +72,7 @@ export function addTestCommand(program: commander.CommanderStatic) {
console.log(''); console.log('');
console.log('Examples:'); console.log('Examples:');
console.log(' $ test my.spec.ts'); console.log(' $ test my.spec.ts');
console.log(' $ test -c tests/ --headed'); console.log(' $ test --headed');
console.log(' $ test --browser=webkit'); console.log(' $ test --browser=webkit');
}); });
} }