优化仿真求解性能并修复流量闭合问题(初版)
This commit is contained in:
1 parent
57b459bc72
commit
5332a788f3
55 files changed
+8973
-549
No files matched your search
@@ -2902,6 +2902,8 @@ test("恢复工程时采用当前目录端口并明确丢弃已删除端口的
|
||||
test("AMESim canvas nodes use icon anchors and highlight only compatible free ports", async ({
|
||||
page,
|
||||
}) => {
|
||||
const pageErrors: string[] = [];
|
||||
page.on("pageerror", (error) => pageErrors.push(error.message));
|
||||
await page.goto("/");
|
||||
|
||||
const firstOrifice = await dragSymbolToCanvas(page, "amesim_pnor001", {
|
||||
@@ -3214,6 +3216,39 @@ test("AMESim canvas nodes use icon anchors and highlight only compatible free po
|
||||
await expect(signalInput).toHaveCSS("opacity", "0");
|
||||
await expect(signalOutput).toHaveCSS("pointer-events", "none");
|
||||
await expect(signalInput).toHaveCSS("pointer-events", "none");
|
||||
|
||||
const renderedEdges = page.locator(".flow-canvas .react-flow__edge");
|
||||
const clickEdgeMiddle = async (edgeIndex: number) => {
|
||||
const point = await renderedEdges
|
||||
.nth(edgeIndex)
|
||||
.locator(".react-flow__edge-interaction")
|
||||
.evaluate((path: SVGPathElement) => {
|
||||
const localPoint = path.getPointAtLength(path.getTotalLength() / 2);
|
||||
const matrix = path.getScreenCTM();
|
||||
if (!matrix) {
|
||||
throw new Error("Unable to resolve the edge screen position");
|
||||
}
|
||||
const screenPoint = new DOMPoint(
|
||||
localPoint.x,
|
||||
localPoint.y,
|
||||
).matrixTransform(matrix);
|
||||
return { x: screenPoint.x, y: screenPoint.y };
|
||||
});
|
||||
await page.mouse.click(point.x, point.y);
|
||||
};
|
||||
|
||||
await clickEdgeMiddle(0);
|
||||
await expect(renderedEdges).toHaveCount(2);
|
||||
await expect(renderedEdges.nth(0)).toHaveClass(
|
||||
/selected|editor-edge-selected/,
|
||||
);
|
||||
await clickEdgeMiddle(1);
|
||||
await expect(renderedEdges).toHaveCount(2);
|
||||
await expect(renderedEdges.nth(1)).toHaveClass(
|
||||
/selected|editor-edge-selected/,
|
||||
);
|
||||
await expect(page.getByText("System Simulation Flow", { exact: true })).toBeVisible();
|
||||
expect(pageErrors).toEqual([]);
|
||||
});
|
||||
|
||||
test("端口图标随画布缩小且物理端口始终保持标准圆形", async ({ page }) => {
|
||||
|
||||
Reference in new issue
Block a user