add back PLAYWRIGHT_URL implementation

This commit is contained in:
Francis Cao committed 2026-05-27 16:24:01 -07:00
1 parent cf7b722fe6
commit 1a6f494754
3 files changed
+11

No files matched your search

+1
View File
@@ -99,6 +99,7 @@
"npm-run-all": "^4.1.5",
"papaparse": "^5.5.3",
"pg": "^8.21.0",
"playwright-core": "^1.60.0",
"prisma": "^7.8.0",
"prop-types": "^15.8.1",
"pure-rand": "^8.4.0",
+3
View File
@@ -146,6 +146,9 @@ importers:
pg:
specifier: ^8.21.0
version: 8.21.0
playwright-core:
specifier: ^1.60.0
version: 1.60.0
prisma:
specifier: ^7.8.0
version: 7.8.0(@types/react-dom@19.2.3(@types/react@19.2.14))(@types/react@19.2.14)(react-dom@19.2.6(react@19.2.6))(react@19.2.6)(typescript@6.0.3)
@@ -578,6 +578,13 @@ function getSnapshotErrorMessage(error: unknown) {
}
async function createSnapshotBrowser() {
const endpoint = process.env.PLAYWRIGHT_URL?.trim();
if (endpoint) {
const { chromium } = await import('playwright-core');
return chromium.connect(endpoint);
}
const { chromium } = await import('@playwright/test');
return chromium.launch({
channel: 'chromium',