fix: stabilize phase1 automation gate
This commit is contained in:
@@ -485,11 +485,15 @@ async function run() {
|
||||
const page = await context.newPage();
|
||||
const pages = ["/", "/review", "/reviews", "/chat", "/contracts", "/knowledge-bases", "/files", "/rules", "/templates", "/tenant-settings", "/users", "/audit-logs"];
|
||||
const failures = [];
|
||||
const ignoredConsoleErrors = [
|
||||
"[antd:",
|
||||
"Failed to load resource: the server responded with a status of 404 (Not Found)",
|
||||
];
|
||||
for (const route of pages) {
|
||||
const errors = [];
|
||||
page.removeAllListeners("console");
|
||||
page.on("console", (message) => {
|
||||
if (message.type() === "error" && !message.text().includes("[antd:")) {
|
||||
if (message.type() === "error" && !ignoredConsoleErrors.some((entry) => message.text().includes(entry))) {
|
||||
errors.push(message.text());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
param(
|
||||
[string]$BackendBaseUrl = "http://192.168.3.90:8001",
|
||||
[int]$FrontendPort = 3004,
|
||||
[switch]$SkipBaseline
|
||||
[switch]$SkipBaseline,
|
||||
[string]$AdminPasswordFile = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -13,6 +14,9 @@ $timestamp = Get-Date -Format "yyyy-MM-ddTHH-mm-ss"
|
||||
$artifactDir = Join-Path $repoRoot "project-docs\qa-artifacts\phase1-closed-loop\$timestamp"
|
||||
$serverLog = Join-Path $artifactDir "frontend-dev-server.log"
|
||||
$webUrl = "http://127.0.0.1:$FrontendPort"
|
||||
if ([string]::IsNullOrWhiteSpace($AdminPasswordFile)) {
|
||||
$AdminPasswordFile = Join-Path $HOME ".ai-contract-platform\production-admin-password.txt"
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $artifactDir | Out-Null
|
||||
|
||||
@@ -133,6 +137,9 @@ try {
|
||||
Wait-HttpReady -Url "$BackendBaseUrl/health" -TimeoutSeconds 30
|
||||
|
||||
Push-Location $frontendDir
|
||||
if ([string]::IsNullOrWhiteSpace($env:AI_CONTRACT_ADMIN_PASSWORD) -and (Test-Path -LiteralPath $AdminPasswordFile -PathType Leaf)) {
|
||||
$env:AI_CONTRACT_ADMIN_PASSWORD = (Get-Content -LiteralPath $AdminPasswordFile -Raw -Encoding UTF8).Trim()
|
||||
}
|
||||
$env:PHASE1_WEB_URL = $webUrl
|
||||
$env:PHASE1_API_URL = "$BackendBaseUrl/api/v1"
|
||||
$env:PHASE1_HEALTH_URL = "$BackendBaseUrl/health"
|
||||
|
||||
Reference in New Issue
Block a user