fix(e2e): 修复ESM模式下__dirname未定义导致Staging E2E失败 (#647)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 3m3s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 7m22s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 7m46s
CI/CD Pipeline / Unit Tests (push) Successful in 8m8s
CI/CD Pipeline / Frontend Lint (push) Successful in 8m46s
CI/CD Pipeline / Build Staging API Image (push) Successful in 9m17s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 10m15s
CI/CD Pipeline / Integration Tests (push) Successful in 3m8s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m19s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 0s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 0s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 0s

Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #647.
This commit is contained in:
2026-07-20 17:57:03 +08:00
committed by auto-approve-bot
parent 87f506e18a
commit 01acf68d25
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1,7 +1,9 @@
import { expect, test, type APIRequestContext } from "@playwright/test"
import * as fs from "node:fs"
import * as path from "node:path"
import { fileURLToPath } from "node:url"
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const PASSWORD = "SmokePass123!"
const apiBase = process.env.E2E_API_BASE || "/api/v1"
const apiOrigin = apiBase.endsWith("/api/v1") ? apiBase.slice(0, -"/api/v1".length) : ""
+2
View File
@@ -1,7 +1,9 @@
import { expect, test, type APIRequestContext } from "@playwright/test"
import * as fs from "node:fs"
import * as path from "node:path"
import { fileURLToPath } from "node:url"
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const PASSWORD = "SmokePass123!"
const apiBase = process.env.E2E_API_BASE || "/api/v1"
const apiOrigin = apiBase.endsWith("/api/v1") ? apiBase.slice(0, -"/api/v1".length) : ""