mirror of
https://github.com/umami-software/umami.git
synced 2026-05-30 06:47:25 +00:00
fix import errors for playwright test
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user