ci: 增加 PR 浏览器 smoke
This commit is contained in:
1 parent
040504774d
commit
eebeddd74f
8 files changed
+72
-6
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { defineConfig } from "@playwright/test";
|
||||
|
||||
const adminOrigin = process.env.ADMIN_URL || "http://127.0.0.1:3005";
|
||||
|
||||
export default defineConfig({
|
||||
testDir: "./test/browser",
|
||||
// PR smoke 只覆盖最容易影响所有后台操作的会话与品牌创建流程。
|
||||
testMatch: ["admin-session.spec.ts", "brand-creation-and-page-scheme.spec.ts"],
|
||||
timeout: 30000,
|
||||
fullyParallel: false,
|
||||
workers: 1,
|
||||
use: {
|
||||
viewport: { width: 1440, height: 1000 },
|
||||
screenshot: "only-on-failure",
|
||||
trace: "retain-on-failure",
|
||||
launchOptions: { args: ["--no-sandbox"] },
|
||||
},
|
||||
reporter: [["list"]],
|
||||
outputDir: "../../.codex-tasks/browser-smoke/raw",
|
||||
webServer: {
|
||||
// 使用已构建的 Admin 静态产物,避免在 CI 中额外启动 API 或 Vite 开发代理。
|
||||
command:
|
||||
"pnpm --dir ../../apps/admin exec vite preview --host 127.0.0.1 --port 3005 --strictPort",
|
||||
url: `${adminOrigin}/admin/brands/new`,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 60000,
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user