fix import errors for playwright test
This commit is contained in:
1 parent
c3cddcb774
commit
d803eb7210
1 file changed
+1
-2
@@ -578,14 +578,13 @@ function getSnapshotErrorMessage(error: unknown) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createSnapshotBrowser() {
|
async function createSnapshotBrowser() {
|
||||||
|
const { chromium } = await import('playwright-core');
|
||||||
const endpoint = process.env.PLAYWRIGHT_URL?.trim();
|
const endpoint = process.env.PLAYWRIGHT_URL?.trim();
|
||||||
|
|
||||||
if (endpoint) {
|
if (endpoint) {
|
||||||
const { chromium } = await import('playwright-core');
|
|
||||||
return chromium.connect(endpoint);
|
return chromium.connect(endpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { chromium } = await import('@playwright/test');
|
|
||||||
return chromium.launch({
|
return chromium.launch({
|
||||||
channel: 'chromium',
|
channel: 'chromium',
|
||||||
headless: true,
|
headless: true,
|
||||||
|
|||||||
Reference in new issue
Block a user