Skip to content

Commit 4a55e58

Browse files
committed
fixed some errors
1 parent 9de4efa commit 4a55e58

7 files changed

+23
-14
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ To use the service, the client must authenticate with the service to access the
2424

2525
Microsoft Entra ID uses your Azure credentials, requiring a sign-in to your Azure account for secure access. Alternatively, you can generate an access token from your Playwright workspace and use it in your setup. However, we strongly recommend Microsoft Entra ID for authentication due to its enhanced security. Access tokens, while convenient, function like long-lived passwords and are more susceptible to being compromised.
2626

27-
## Enable access-token based authentication
27+
## Enable authentication using access-tokens
2828

2929
Microsoft Playwright Testing service also supports authentication using access tokens. This authentication method is less secure. We recommend using Microsoft Entra ID to authenticate to the service.
3030

@@ -54,7 +54,7 @@ To enable authentication using access tokens:
5454
```typescript
5555
/* Learn more about service configuration at https://aka.ms/mpt/config */
5656
export default defineConfig(config, getServiceConfig( config {
57-
defaultAuth:'TOKEN'
57+
serviceAuthType:'ACCESS_TOKEN'
5858
}));
5959
```
6060

@@ -91,7 +91,6 @@ Run Playwright tests against cloud-hosted browsers and publish the results to th
9191
npx playwright test --config=playwright.service.config.ts --workers=20
9292
```
9393

94-
9594
## Related content
9695

9796
- Learn more about [managing access tokens](./how-to-manage-access-tokens.md).

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import config from "./playwright.config";
2424
export default defineConfig(
2525
config,
2626
getServiceConfig(config, {
27-
defaultAuth: 'TOKEN', // Use this option when you want to authenticate using access tokens. This mode of auth should be enabled for the workspace.
27+
serviceAuthType:'ACCESS_TOKEN' // Use this option when you want to authenticate using access tokens. This mode of auth should be enabled for the workspace.
2828
os: ServiceOS.WINDOWS, // Select the operating system where you want to run tests.
2929
runId: new Date().toISOString(), // Set a unique ID for every test run to distinguish them in the service portal.
3030
credential: new AzureCliCredential(), // Select the authentication method you want to use with Entra.
@@ -49,15 +49,15 @@ export default defineConfig(
4949

5050
## Settings in `playwright.service.config.ts` file
5151

52-
* **`defaultAuth`**:
52+
* **`serviceAuthType`**:
5353
- **Description**: This setting allows you to choose the authentication method you want to use for your test run.
5454
- **Available Options**:
5555
- `TOKEN` to use access tokens. You need to enable authtication using access tokens if you want to use this option, see [manage authentication](./how-to-manage-authentication.md).
5656
- `ENTRA` to use Enrta ID for authentication. This is the default mode.
57-
- **Default Value**: `ENTRA`
57+
- **Default Value**: `ENTRA_ID`
5858
- **Example**:
5959
```typescript
60-
defaultAuth:'ENTRA'
60+
serviceAuthType:'ENTRA_ID'
6161
```
6262

6363

articles/playwright-testing/how-to-use-service-features.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ These features have their own pricing plans and are billed separately. You can c
4646

4747
You can also choose to use either feature or both for a test run.
4848

49-
**NOTE**: You can only use a feature in a test run if it is enabled for the workspace.
49+
> [!IMPORTANT]
50+
> You can only use a feature in a test run if it is enabled for the workspace.
5051
5152
1. In your Playwright setup, go to `playwright.service.config.ts` file and use these settings for feature management.
5253

articles/playwright-testing/playwright-testing-reporting-with-sharding.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ jobs:
6161
- uses: actions/setup-node@v3
6262
with:
6363
node-version: 18
64-
- name: OIDC Login to Azure Public Cloud with AzPowershell (enableAzPSSession true) # This step is to sign-in to Azure to run tests from GitHub Action workflow
64+
# This step is to sign-in to Azure to run tests from GitHub Action workflow.
65+
# You can choose how set up Authentication to Azure from GitHub Actions, this is one example.
66+
- name: OIDC Login to Azure Public Cloud with AzPowershell (enableAzPSSession true)
6567
uses: azure/login@v2
6668
with:
6769
client-id: ${{ secrets.AZURE_CLIENT_ID }}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ After you complete this quickstart, you have a CI workflow that runs your Playwr
2525
- A GitHub account. If you don't have a GitHub account, you can [create one for free](https://github.com/).
2626
- A GitHub repository that contains your Playwright test specifications and GitHub Actions workflow. To create a repository, see [Creating a new repository](https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-new-repository).
2727
- A GitHub Actions workflow. If you need help with getting started with GitHub Actions, see [create your first workflow](https://docs.github.com/en/actions/quickstart)
28-
- OpenID connect for Azure for securely authenticating to the service from GitHub Action workflows. To configure see [configuring OpenID connect in Azure](https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/configuring-openid-connect-in-azure)
28+
- Set up authentication from GitHub Actions to Azure. To configure see [Use GitHub Actions to connect to Azure](https://learn.microsoft.com/azure/developer/github/connect-from-azure)
2929

3030
# [Azure Pipelines](#tab/pipelines)
3131
- An Azure DevOps organization and project. If you don't have an Azure DevOps organization, you can [create one for free](/azure/devops/organizations/projects/create-project).
@@ -77,7 +77,7 @@ Update the `package.json` file in your repository to add details about Microaoft
7777

7878
```json
7979
"devDependencies": {
80-
"@azure/microsoft-playwright-testing": "^1.0.0-beta.3"
80+
"@azure/microsoft-playwright-testing": "^1.0.0-beta.2"
8181
}
8282
```
8383
## Update the workflow definition
@@ -94,7 +94,8 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
9494

9595
```yml
9696

97-
# This step is to sign-in to Azure to run tests from GitHub Action workflow. You need to configure Open ID connect to set up authentication with Azure
97+
# This step is to sign-in to Azure to run tests from GitHub Action workflow.
98+
# You can choose how set up Authentication to Azure from GitHub Actions, this is one example.
9899
- name: OIDC Login to Azure Public Cloud with AzPowershell (enableAzPSSession true)
99100
uses: azure/login@v2
100101
with:

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ To use the service, install Microsoft Playwright Testing package.
3838
npm init @azure/microsoft-playwright-testing
3939
```
4040

41-
If you already have a `playwright.service.config.ts` file, the package will ask you to override it.
41+
This will generate a `playwright.service.config.ts` file.
42+
43+
The service configuration serves to:
44+
- Direct and authenticate Playwright to the Microsoft Playwright Testing service.
45+
- Adds a reporter to publish test results and artifacts.
46+
47+
If you already have this file, the package will ask you to override it.
4248

4349
## Configure the service region endpoint
4450

articles/playwright-testing/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ items:
5252
href: how-to-manage-authentication.md
5353
- name: Use service features
5454
href: how-to-use-service-features.md
55-
- name: Service options
55+
- name: Use Service package options
5656
href: how-to-use-service-config-file.md
5757
- name: Samples
5858
items:

0 commit comments

Comments
 (0)