Skip to content

Commit 17d9341

Browse files
committed
Addressed review comments
1 parent 1d72ef5 commit 17d9341

File tree

5 files changed

+40
-42
lines changed

5 files changed

+40
-42
lines changed

articles/app-testing/playwright-workspaces/how-to-manage-authentication.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ To enable authentication using access tokens:
5555

5656
::: zone pivot="playwright-test-runner"
5757

58-
### If you're using the **Playwright Test Runner**:
58+
### If you're using the **Playwright Test Runner**
5959

60-
1. While running the tests, enable access token auth in the `playwright.service.config.ts` file in your setup.
60+
While running the tests, enable access token auth in the `playwright.service.config.ts` file in your setup.
6161

6262
```typescript
6363
import { getServiceConfig, ServiceAuth } from '@azure/playwright';
64-
64+
6565
/* Learn more about service configuration at https://aka.ms/mpt/config */
6666
export default defineConfig(config, getServiceConfig( config {
6767
serviceAuthType: ServiceAuth.ACCESS_TOKEN
@@ -71,7 +71,7 @@ To enable authentication using access tokens:
7171

7272
::: zone pivot="nunit-test-runner"
7373

74-
### If you're using the **NUnit Test Runner**:
74+
### If you're using the **NUnit Test Runner**
7575

7676
1. While running the tests, enable access token auth in the setup file.
7777

@@ -107,37 +107,35 @@ To enable authentication using access tokens:
107107

108108
::: zone pivot="playwright-test-runner"
109109

110-
### If you're using the **Playwright Test Runner**:
110+
## Set up your environment.
111111

112-
3. Set up your environment.
112+
### If you're using the **Playwright Test Runner**
113113

114-
To set up your environment, configure the `PLAYWRIGHT_SERVICE_ACCESS_TOKEN` environment variable with the value you obtained in the previous steps. Ensure this environment variable is available in your setup where you are running tests.
114+
To set up your environment, configure the `PLAYWRIGHT_SERVICE_ACCESS_TOKEN` environment variable with the value you obtained in the previous steps. Ensure this environment variable is available in your setup where you are running tests.
115115

116-
We recommend that you use the `dotenv` module to manage your environment. With `dotenv`, you define your environment variables in the `.env` file.
116+
We recommend that you use the `dotenv` module to manage your environment. With `dotenv`, you define your environment variables in the `.env` file.
117117

118-
1. Add the `dotenv` module to your project:
118+
1. Add the `dotenv` module to your project:
119119

120-
```shell
121-
npm i --save-dev dotenv
122-
```
120+
```shell
121+
npm i --save-dev dotenv
122+
```
123123

124-
2. Create a `.env` file alongside the `playwright.config.ts` file in your Playwright project:
125-
126-
```
127-
PLAYWRIGHT_SERVICE_ACCESS_TOKEN={MY-ACCESS-TOKEN}
128-
```
124+
2. Create a `.env` file alongside the `playwright.config.ts` file in your Playwright project:
125+
126+
```
127+
PLAYWRIGHT_SERVICE_ACCESS_TOKEN={MY-ACCESS-TOKEN}
128+
```
129129

130-
Make sure to replace the `{MY-ACCESS-TOKEN}` text placeholder with the value you copied earlier.
130+
Make sure to replace the `{MY-ACCESS-TOKEN}` text placeholder with the value you copied earlier.
131131

132132
::: zone-end
133133

134134
::: zone pivot="nunit-test-runner"
135135

136-
### If you're using the **NUnit Test Runner**:
137-
138-
3. Set up your environment.
136+
### If you're using the **NUnit Test Runner**
139137

140-
To set up your environment, configure the `PLAYWRIGHT_SERVICE_ACCESS_TOKEN` environment variable with the value you obtained in the previous steps. Ensure this environment variable is available in your setup where you are running tests.
138+
To set up your environment, configure the `PLAYWRIGHT_SERVICE_ACCESS_TOKEN` environment variable with the value you obtained in the previous steps. Ensure this environment variable is available in your setup where you are running tests.
141139

142140
::: zone-end
143141

@@ -147,15 +145,15 @@ Run Playwright tests against cloud-hosted browsers and publish the results to th
147145

148146
::: zone pivot="playwright-test-runner"
149147

150-
### If you're using the **Playwright Test Runner**:
148+
### If you're using the **Playwright Test Runner**
151149
```typescript
152150
npx playwright test --config=playwright.service.config.ts --workers=20
153151
```
154152
::: zone-end
155153

156154
::: zone pivot="nunit-test-runner"
157155

158-
### If you're using the **NUnit Test Runner**:
156+
### If you're using the **NUnit Test Runner**
159157
```bash
160158
dotnet test -- NUnit.NumberOfTestWorkers=20
161159
```

articles/app-testing/playwright-workspaces/how-to-test-local-applications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can specify one or multiple networks by using a list of rules. For example,
3030

3131
::: zone pivot="playwright-test-runner"
3232

33-
### If you're using the **Playwright Test Runner**:
33+
### If you're using the **Playwright Test Runner**
3434

3535
You can configure the `exposeNetwork` option in `playwright.service.config.ts`. The following example shows how to expose the `localhost` network by using the [`<loopback>`](https://en.wikipedia.org/wiki/Loopback) rule. You can also replace `localhost` with a domain that you want to enable for the service.
3636

@@ -60,7 +60,7 @@ npx playwright test --config=playwright.service.config.ts --workers=20
6060

6161
::: zone pivot="nunit-test-runner"
6262

63-
### If you're using the **NUnit Test Runner**:
63+
### If you're using the **NUnit Test Runner**
6464

6565
You can configure the `ExposeNetwork` option in the setup file. The following example shows how to expose the `localhost` network by using the [`<loopback>`](https://en.wikipedia.org/wiki/Loopback) rule. You can also replace `localhost` with a domain that you want to enable for the service.
6666

articles/app-testing/playwright-workspaces/how-to-use-service-config-file.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ zone_pivot_groups: playwright-workspaces
1717

1818
::: zone pivot="playwright-test-runner"
1919

20-
### If you're using the **Playwright Test Runner**:
20+
### If you're using the **Playwright Test Runner**
2121

2222
This article shows you how to use the options available in the `playwright.service.config.ts` file that was generated for you.
2323
If you don't have this file in your code, follow [Quickstart: Run end-to-end tests at scale with Playwright Workspaces](./quickstart-run-end-to-end-tests.md)
@@ -26,7 +26,7 @@ If you don't have this file in your code, follow [Quickstart: Run end-to-end tes
2626

2727
::: zone pivot="nunit-test-runner"
2828

29-
### If you're using the **NUnit Test Runner**:
29+
### If you're using the **NUnit Test Runner**
3030

3131
This article shows you how to use the options available in the `PlaywrightServiceSetup.cs` file.
3232
If you don't have this file in your code, follow [Quickstart: Run end-to-end tests at scale with Playwright Workspaces](./quickstart-run-end-to-end-tests.md)
@@ -42,7 +42,7 @@ If you don't have this file in your code, follow [Quickstart: Run end-to-end tes
4242

4343
::: zone pivot="playwright-test-runner"
4444

45-
### If you're using the **Playwright Test Runner**:
45+
### If you're using the **Playwright Test Runner**
4646

4747
Below is a complete example of a `playwright.service.config.ts` file showing all supported configuration options:
4848

@@ -131,7 +131,7 @@ export default defineConfig(
131131

132132
::: zone pivot="nunit-test-runner"
133133

134-
### If you're using the **NUnit Test Runner**:
134+
### If you're using the **NUnit Test Runner**
135135

136136

137137
Here's version of the setup file with all the available options:

articles/app-testing/playwright-workspaces/quickstart-automate-end-to-end-testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ To get the service endpoint URL and store it as a CI workflow secret, perform th
6767

6868
## Add service configuration file
6969

70-
### If you're using the **Playwright Test Runner**:
70+
### If you're using the **Playwright Test Runner**
7171

7272
If you don't have Playwright tests configured to run with the service, add a service configuration file to your repository. In the next step, you then specify this service configuration file on the Playwright CLI.
7373

@@ -99,7 +99,7 @@ Update the `package.json` file in your repository to add details about Playwrigh
9999

100100
## Install service package
101101

102-
### If you're using the **NUnit Test Runner**:
102+
### If you're using the **NUnit Test Runner**
103103

104104
In your project, install Playwright Workspaces package.
105105

@@ -223,7 +223,7 @@ You can generate an access token from your Playwright workspace and use it in yo
223223

224224
::: zone pivot="playwright-test-runner"
225225

226-
### If you're using the **Playwright Test Runner**:
226+
### If you're using the **Playwright Test Runner**
227227
Update the CI workflow definition to run your Playwright tests with the Playwright CLI. Pass the [service configuration file](#add-service-configuration-file) as an input parameter for the Playwright CLI. You configure your environment by specifying environment variables.
228228

229229
1. Open the CI workflow definition.
@@ -324,7 +324,7 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
324324
325325
::: zone pivot="nunit-test-runner"
326326
327-
### If you're using the **NUnit Test Runner**:
327+
### If you're using the **NUnit Test Runner**
328328
329329
Update the CI workflow definition to run your Playwright tests with the Playwright NUnit CLI. You configure your environment by specifying environment variables.
330330

articles/app-testing/playwright-workspaces/quickstart-run-end-to-end-tests.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To get started with running your Playwright tests on cloud browsers, you first n
7070

7171
::: zone pivot="playwright-test-runner"
7272

73-
### If you're using the **Playwright Test Runner**:
73+
### If you're using the **Playwright Test Runner**
7474

7575
To use the service, install the Playwright Workspaces package.
7676

@@ -86,7 +86,7 @@ If you already have this file, the package asks you to overwrite it.
8686

8787
::: zone pivot="nunit-test-runner"
8888

89-
### If you're using the **NUnit Test Runner**:
89+
### If you're using the **NUnit Test Runner**
9090

9191
To use the service, install the Playwright Workspaces package.
9292

@@ -118,7 +118,7 @@ To get the service endpoint URL, perform the following steps:
118118

119119
## Set up your environment
120120

121-
### If you're using the **Playwright Test Runner**:
121+
### If you're using the **Playwright Test Runner**
122122

123123
To set up your environment, you have to configure the `PLAYWRIGHT_SERVICE_URL` environment variable with the value you obtained in the previous steps.
124124

@@ -144,7 +144,7 @@ We recommend that you use the `dotenv` module to manage your environment. With `
144144

145145
## Set up service configuration
146146

147-
### If you're using the **NUnit Test Runner**:
147+
### If you're using the **NUnit Test Runner**
148148

149149
Create a file `PlaywrightServiceSetup.cs` in your project with the following content.
150150

@@ -202,7 +202,7 @@ You can generate an access token from your Playwright workspace and use it in yo
202202

203203
::: zone pivot="playwright-test-runner"
204204

205-
### If you're using the **Playwright Test Runner**:
205+
### If you're using the **Playwright Test Runner**
206206

207207
You've now prepared the configuration for running your Playwright tests in the cloud with Playwright Workspaces. You can either use the Playwright CLI to run your tests, or use the [Playwright Test Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright).
208208
@@ -334,7 +334,7 @@ To run your Playwright test suite in Visual Studio Code with Playwright Workspac
334334
335335
::: zone pivot="nunit-test-runner"
336336
337-
### If you're using the **NUnit Test Runner**:
337+
### If you're using the **NUnit Test Runner**
338338

339339
Run Playwright tests against browsers managed by the service using the configuration you created above.
340340

@@ -364,13 +364,13 @@ With Playwright Workspaces, you can run with up to 50 parallel workers. Several
364364

365365
::: zone pivot="playwright-test-runner"
366366

367-
### If you're using the **Playwright Test Runner**:
367+
### If you're using the **Playwright Test Runner**
368368
You can specify the number of parallel workers on the Playwright CLI command-line, or configure the `workers` property in the Playwright service configuration file.
369369
::: zone-end
370370

371371
::: zone pivot="nunit-test-runner"
372372

373-
### If you're using the **NUnit Test Runner**:
373+
### If you're using the **NUnit Test Runner**
374374
You can specify the number of parallel workers on the Playwright CLI command-line, or configure the `NumberOfTestWorkers` property in the `.runsettings` file.
375375
::: zone-end
376376

0 commit comments

Comments
 (0)