Skip to content

Commit d7bd5ae

Browse files
jakebaileysnovader
authored andcommitted
Fix playright browser installs due to upstream breaking change (microsoft#55740)
1 parent 6f48e1b commit d7bd5ae

File tree

5 files changed

+76
-13
lines changed

5 files changed

+76
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ jobs:
9797
check-latest: true
9898
- run: npm ci
9999

100-
- name: Adding playwright
101-
run: npm install --no-save --no-package-lock playwright
100+
- name: Installing browsers
101+
run: npx playwright install --with-deps
102102

103103
- name: Validate the browser can import TypeScript
104104
run: npx hereby test-browser-integration

.github/workflows/release-branch-artifact.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
run: |
3131
npm ci
3232
npm test
33-
- name: Adding playwright
34-
run: npm install --no-save --no-package-lock playwright
33+
- name: Installing browsers
34+
run: npx playwright install --with-deps
3535
- name: Validate the browser can import TypeScript
3636
run: npx hereby test-browser-integration
3737
- name: LKG, clean, and pack

package-lock.json

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"mocha-fivemat-progress-reporter": "^0.1.0",
7676
"ms": "^2.1.3",
7777
"node-fetch": "^3.2.10",
78+
"playwright": "^1.38.0",
7879
"source-map-support": "^0.5.21",
7980
"tslib": "^2.5.0",
8081
"typescript": "^5.0.2",

scripts/browserIntegrationTest.mjs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,7 @@ import {
55
import {
66
join,
77
} from "path";
8-
9-
let playwright;
10-
try {
11-
// @ts-ignore-error
12-
playwright = await import("playwright");
13-
}
14-
catch (error) {
15-
throw new Error("Playwright is expected to be installed manually before running this script");
16-
}
8+
import playwright from "playwright";
179

1810
// Turning this on will leave the Chromium browser open, giving you the
1911
// chance to open up the web inspector.

0 commit comments

Comments
 (0)