调整Playwright默认浏览器策略
This commit is contained in:
1 parent
cf249d6c0d
commit
de265cdde6
1 file changed
+5
-1
@@ -1,5 +1,8 @@
|
||||
import { defineConfig } from "@playwright/test";
|
||||
|
||||
const channel = process.env.PLAYWRIGHT_CHANNEL?.trim();
|
||||
const executablePath = process.env.PLAYWRIGHT_EXECUTABLE_PATH?.trim();
|
||||
|
||||
export default defineConfig({
|
||||
testDir: "./tests/e2e",
|
||||
fullyParallel: false,
|
||||
@@ -10,7 +13,8 @@ export default defineConfig({
|
||||
},
|
||||
use: {
|
||||
baseURL: "http://127.0.0.1:4173",
|
||||
channel: "msedge",
|
||||
...(channel ? { channel } : {}),
|
||||
...(executablePath ? { launchOptions: { executablePath } } : {}),
|
||||
headless: true,
|
||||
viewport: { width: 1440, height: 900 },
|
||||
screenshot: "only-on-failure",
|
||||
|
||||
Reference in new issue
Block a user