0fcb77b991
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Successful in 1m6s
CI Build & Deploy Pipeline / Build Staging Web Image (push) Successful in 1m49s
CI Build & Deploy Pipeline / Build Production API Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (push) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (push) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (push) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 3m1s
CI/CD Pipeline / Unit Tests (push) Successful in 3m20s
CI/CD Pipeline / Integration Tests (push) Successful in 1m29s
CI Build & Deploy Pipeline / Build Staging API Image (push) Successful in 7m4s
CI Build & Deploy Pipeline / Build Staging Worker Image (push) Successful in 7m54s
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 45s
CI Build & Deploy Pipeline / Staging E2E Tests (push) Failing after 2m50s
CI Build & Deploy Pipeline / Staging API Integration Tests (push) Successful in 3m28s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
72 lines
1.8 KiB
TypeScript
72 lines
1.8 KiB
TypeScript
/**
|
|
* Playwright E2E 测试配置
|
|
*/
|
|
import { defineConfig, devices } from "@playwright/test"
|
|
|
|
const externalBaseURL = process.env.E2E_BASE_URL
|
|
|
|
export default defineConfig({
|
|
testDir: "./e2e",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: [["html"], ["list"]],
|
|
use: {
|
|
baseURL: externalBaseURL || "http://localhost:3000",
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
video: process.env.E2E_VIDEO ? "retain-on-failure" : "off",
|
|
},
|
|
|
|
projects: process.env.E2E_ALL_BROWSERS
|
|
? [
|
|
{
|
|
name: "chromium",
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
channel: process.env.E2E_BROWSER_CHANNEL || "msedge",
|
|
launchOptions: {
|
|
args: ["--disable-gpu", "--disable-software-rasterizer"],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
name: "firefox",
|
|
use: { ...devices["Desktop Firefox"] },
|
|
},
|
|
{
|
|
name: "webkit",
|
|
use: { ...devices["Desktop Safari"] },
|
|
},
|
|
{
|
|
name: "Mobile Chrome",
|
|
use: { ...devices["Pixel 5"] },
|
|
},
|
|
{
|
|
name: "Mobile Safari",
|
|
use: { ...devices["iPhone 12"] },
|
|
},
|
|
]
|
|
: [
|
|
{
|
|
name: "chromium",
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
channel: process.env.E2E_BROWSER_CHANNEL || "msedge",
|
|
launchOptions: {
|
|
args: ["--disable-gpu", "--disable-software-rasterizer"],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
|
|
webServer: externalBaseURL
|
|
? undefined
|
|
: {
|
|
command: "npm run dev -- --host 127.0.0.1 --port 3000",
|
|
url: "http://localhost:3000",
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
})
|