fix import errors for playwright test

This commit is contained in:
Francis Cao
2026-05-27 16:04:39 -07:00
parent c3cddcb774
commit d803eb7210
@@ -578,14 +578,13 @@ function getSnapshotErrorMessage(error: unknown) {
}
async function createSnapshotBrowser() {
const { chromium } = await import('playwright-core');
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',
headless: true,