Skip to content

Commit 3db8b73

Browse files
committed
fixed check issues
1 parent dc817b3 commit 3db8b73

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ To enable authentication using access tokens:
5151

5252
1. While running the tests, enable access token auth in the `playwright.service.config.ts` file in your setup.
5353

54-
```typeScript
54+
```typescript
5555
/* Learn more about service configuration at https://aka.ms/mpt/config */
5656
export default defineConfig(config, getServiceConfig( config {
5757
defaultAuth:'TOKEN'
@@ -87,7 +87,7 @@ To enable authentication using access tokens:
8787

8888
Run Playwright tests against cloud-hosted browsers and publish the results to the service using the configuration you created above.
8989

90-
```nodejs
90+
```typescript
9191
npx playwright test --config=playwright.service.config.ts --workers=20
9292
```
9393

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,5 @@ export default defineConfig(
131131
},
132132
],
133133
]
134-
```
134+
```
135135

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
9494

9595
```yml
9696

97-
98-
- 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
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
98+
- name: OIDC Login to Azure Public Cloud with AzPowershell (enableAzPSSession true)
9999
uses: azure/login@v2
100100
with:
101101
client-id: ${{ secrets.AZURE_CLIENT_ID }}
@@ -134,17 +134,20 @@ Update the CI workflow definition to run your Playwright tests with the Playwrig
134134
targetType: 'inline'
135135
script: 'npm ci'
136136
workingDirectory: path/to/playwright/folder # update accordingly
137-
138-
- task: PowerShell@2
139-
enabled: true
140-
displayName: "Run Playwright tests"
141-
env:
142-
PLAYWRIGHT_SERVICE_ACCESS_TOKEN: $(PLAYWRIGHT_SERVICE_ACCESS_TOKEN)
137+
138+
- task: AzureCLI@2
139+
displayName: Run Playwright Test
140+
env:
143141
PLAYWRIGHT_SERVICE_URL: $(PLAYWRIGHT_SERVICE_URL)
142+
PLAYWRIGHT_SERVICE_RUN_ID: ${{ parameters.runIdPrefix }}$(Build.DefinitionName) - $(Build.BuildNumber) - $(System.JobAttempt)
144143
inputs:
145-
targetType: 'inline'
146-
script: 'npx playwright test -c playwright.service.config.ts --workers=20'
147-
workingDirectory: path/to/playwright/folder # update accordingly
144+
azureSubscription: My_Service_Connection # Service connection used to authenticate this pipeline with Azure to use the service
145+
scriptType: 'pscore'
146+
scriptLocation: 'inlineScript'
147+
inlineScript: |
148+
npx playwright test -c playwright.service.config.ts --workers=20
149+
addSpnToEnvironment: true
150+
workingDirectory: path/to/playwright/folder # update accordingly
148151

149152
- task: PublishPipelineArtifact@1
150153
displayName: Upload Playwright report

0 commit comments

Comments
 (0)