修复测试模型路径并完善四路八路回归与文档
- 按文件哈希区分当前八路工程和历史 Amesim 基准,修复测试与清单中的旧路径。 - 四路审计从 JSON 按需生成 XML,八路新增只核对模式,并显式使用 UTF-8 与 LF。 - 将缺失高刚度夹具的测试替换为当前八路完整 BDF 运行,明确未恢复原 RK45 专项覆盖。 - 更新前端大型工程测试、历史活动回放入口、数据说明、现行规范和相关报告。 验证:全量后台 374 项通过、1 项条件跳过;前端 11 项通过、历史独立服务用例 1 项跳过;四路八路 AME 审计通过。 环境、缓存和运行产物保持忽略;本次未实施工程 JSON 字段精简。
This commit is contained in:
1 parent
44b6ea74ab
commit
b6c22a54f8
32 files changed
+318
-153
No files matched your search
@@ -23,7 +23,7 @@ type ImportedProject = {
|
||||
};
|
||||
|
||||
const MQL_8_PROJECT_PATH = fileURLToPath(
|
||||
new URL("../../../tests/fixtures/legacy/test-mql-8.json", import.meta.url),
|
||||
new URL("../../../tests/data/test-mql-8-corrected.json", import.meta.url),
|
||||
);
|
||||
const mql8Project = JSON.parse(
|
||||
readFileSync(MQL_8_PROJECT_PATH, "utf8"),
|
||||
@@ -337,7 +337,7 @@ test("加载本地工程后自动适配建模画布", async ({ page }) => {
|
||||
exact: true,
|
||||
});
|
||||
await expect(consolePanel.locator(".simulation-console-dock-summary")).toContainText(
|
||||
"工程已加载",
|
||||
"已按旧工程规则读取参数",
|
||||
);
|
||||
await expect(consolePanel.locator(".simulation-console-dock-log")).toHaveCount(0);
|
||||
await page.getByRole("button", { name: "展开仿真控制台" }).click();
|
||||
@@ -480,7 +480,7 @@ test("恢复自动保存工程后自动适配建模画布", async ({ page }) =>
|
||||
exact: true,
|
||||
});
|
||||
await expect(consolePanel.locator(".simulation-console-dock-summary")).toContainText(
|
||||
"已恢复上次自动保存的工程",
|
||||
"已按旧工程规则读取参数",
|
||||
);
|
||||
await expect(consolePanel.locator(".simulation-console-dock-log")).toHaveCount(0);
|
||||
await page.getByRole("button", { name: "展开仿真控制台" }).click();
|
||||
@@ -687,9 +687,11 @@ test("结果页系统图为真实大型工程的非连接交叉线显示线桥",
|
||||
await expect(
|
||||
page.locator(".results-system-canvas .react-flow__node"),
|
||||
).toHaveCount(mql8Project.nodes.length);
|
||||
// In the AME-corrected layout P4 #5 crosses the non-connected vertical line.
|
||||
// P4 #1 used by the old fixture no longer has that crossing after rotation.
|
||||
await expect(
|
||||
page.locator(
|
||||
'.results-system-canvas .react-flow__edge[data-id="edge-amesim_p4node2_1-port_2-amesim_pnl0001_13-port_2-1786972847258"] .react-flow__edge-path',
|
||||
'.results-system-canvas .react-flow__edge[data-id="edge-amesim_p4node2_5-port_3-amesim_pnl0001_17-port_2-1786949374542"] .react-flow__edge-path',
|
||||
),
|
||||
).toHaveAttribute("d", / Q /);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { createHash } from "node:crypto";
|
||||
import { readFileSync, statSync, writeFileSync } from "node:fs";
|
||||
import { mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
||||
import { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
type CompactProgressEvent = {
|
||||
@@ -42,12 +43,14 @@ type BrowserStreamEvidence = {
|
||||
parseErrors: string[];
|
||||
};
|
||||
|
||||
// Historical Python activity replay, opt-in only. Current native acceptance uses
|
||||
// tests/manual/browser_native_simulation.mjs with the corrected eight-branch JSON.
|
||||
const PROJECT_PATH = fileURLToPath(
|
||||
new URL("../../../tests/fixtures/legacy/test-mql-8.json", import.meta.url),
|
||||
new URL("../../../tests/baselines/simulation/test_mql_8/sources/test-mql-8.json", import.meta.url),
|
||||
);
|
||||
const EVIDENCE_PATH = fileURLToPath(
|
||||
new URL(
|
||||
"../../../tests/baselines/simulation/test_mql_8/runs/2026-08-18-production-browser-live-activity-v1-0.2.json",
|
||||
"../../../test/live-browser-mql8/latest-evidence.json",
|
||||
import.meta.url,
|
||||
),
|
||||
);
|
||||
@@ -206,6 +209,11 @@ function retainMoreCompleteEvidence(
|
||||
return retained;
|
||||
}
|
||||
|
||||
test.skip(
|
||||
({ baseURL }) => baseURL !== "http://127.0.0.1:14173",
|
||||
"Historical activity replay requires --config playwright.live.config.ts and its separate backend; current native acceptance has a separate entry.",
|
||||
);
|
||||
|
||||
test("test-mql-8 在真实浏览器流式链路完成 0.2 s BDF 仿真", async ({
|
||||
page,
|
||||
}, testInfo) => {
|
||||
@@ -514,7 +522,7 @@ test("test-mql-8 在真实浏览器流式链路完成 0.2 s BDF 仿真", async (
|
||||
servingMode: "isolated-vite-dev-proxy",
|
||||
},
|
||||
source: {
|
||||
path: "tests/fixtures/legacy/test-mql-8.json",
|
||||
path: "tests/baselines/simulation/test_mql_8/sources/test-mql-8.json",
|
||||
bytes: statSync(PROJECT_PATH).size,
|
||||
sha256: createHash("sha256").update(projectBytes).digest("hex"),
|
||||
},
|
||||
@@ -562,6 +570,7 @@ test("test-mql-8 在真实浏览器流式链路完成 0.2 s BDF 仿真", async (
|
||||
},
|
||||
};
|
||||
const serializedEvidence = `${JSON.stringify(evidence, null, 2)}\n`;
|
||||
mkdirSync(dirname(EVIDENCE_PATH), { recursive: true });
|
||||
writeFileSync(EVIDENCE_PATH, serializedEvidence, "utf8");
|
||||
await testInfo.attach("mql8-live-browser-evidence", {
|
||||
body: Buffer.from(serializedEvidence),
|
||||
|
||||
Reference in new issue
Block a user