完善通用求解器回归与前端交互
- 引入因果坐标内核、热流体恢复和递进长时回归\n- 完善正交连线、线桥、视图保持与结果曲线缩放\n- 补充依赖约束、CI、测试基线和北京时间更新日志
This commit is contained in:
1 parent
143e8dd309
commit
b435daecf2
65 files changed
+172271
-701
No files matched your search
@@ -3077,10 +3077,25 @@ test("AMESim canvas nodes use icon anchors and highlight only compatible free po
|
||||
await page.locator(".flow-canvas .react-flow__pane").click({
|
||||
position: { x: 20, y: 20 },
|
||||
});
|
||||
await expect(firstPhysicalOutput).toHaveAttribute(
|
||||
"data-connection-state",
|
||||
"origin",
|
||||
);
|
||||
const manualDraft = page.locator(".flow-canvas .manual-connection-draft");
|
||||
await expect(manualDraft).toBeVisible();
|
||||
await expect(manualDraft.locator(".react-flow__connection-path")).toHaveAttribute(
|
||||
"data-waypoint-count",
|
||||
"1",
|
||||
);
|
||||
await expect(manualDraft.locator(".manual-connection-waypoint")).toHaveCount(1);
|
||||
await expect(page.locator(".flow-canvas .react-flow__edge")).toHaveCount(0);
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(firstPhysicalOutput).toHaveAttribute(
|
||||
"data-connection-state",
|
||||
"idle",
|
||||
);
|
||||
await expect(manualDraft).toHaveCount(0);
|
||||
|
||||
await compatiblePhysicalPort.click();
|
||||
await expect(page.locator(".flow-canvas .react-flow__edge")).toHaveCount(0);
|
||||
await expect(compatiblePhysicalPort).toHaveAttribute(
|
||||
@@ -3094,8 +3109,16 @@ test("AMESim canvas nodes use icon anchors and highlight only compatible free po
|
||||
);
|
||||
|
||||
await firstPhysicalOutput.click();
|
||||
await page.locator(".flow-canvas .react-flow__pane").click({
|
||||
position: { x: 70, y: 90 },
|
||||
});
|
||||
await expect(manualDraft.locator(".react-flow__connection-path")).toHaveAttribute(
|
||||
"data-waypoint-count",
|
||||
"1",
|
||||
);
|
||||
await compatiblePhysicalPort.click();
|
||||
await expect(page.locator(".flow-canvas .react-flow__edge")).toHaveCount(1);
|
||||
await expect(manualDraft).toHaveCount(0);
|
||||
await expect(firstPhysicalOutput).toHaveAttribute("data-connected", "true");
|
||||
await expect(compatiblePhysicalPort).toHaveAttribute("data-connected", "true");
|
||||
await expect(firstPhysicalOutput).toHaveCSS("opacity", "0");
|
||||
@@ -3107,6 +3130,15 @@ test("AMESim canvas nodes use icon anchors and highlight only compatible free po
|
||||
await expect(physicalEdge.locator(".edge-endpoint-blocker")).toHaveCount(0);
|
||||
await expect(physicalEdge.locator(".react-flow__edge-interaction")).toHaveCount(1);
|
||||
await expect(physicalEdge).not.toHaveClass(/editor-edge-contact/);
|
||||
await page.getByRole("button", { name: "保存工程", exact: true }).click();
|
||||
const routedEdge = await page.evaluate(() => {
|
||||
const raw = window.localStorage.getItem(
|
||||
"system-simulation-flow:project:demo-system",
|
||||
);
|
||||
const project = raw ? JSON.parse(raw) : null;
|
||||
return project?.edges?.[0] ?? null;
|
||||
});
|
||||
expect(routedEdge?.data?.routePoints?.length).toBeGreaterThan(0);
|
||||
|
||||
await signalOutput.click();
|
||||
await expect(signalOutput).toHaveAttribute("data-connection-state", "origin");
|
||||
|
||||
Reference in new issue
Block a user