fix: align PNL0001 symbol causality
This commit is contained in:
1 parent
cca9d1e883
commit
6bb0591d32
2 files changed
+10
-2
No files matched your search
@@ -205,11 +205,11 @@ export function AmesimPnl00rSymbol() {
|
||||
);
|
||||
}
|
||||
|
||||
/** C-R dynamic pneumatic line (AMESim PNL0001). */
|
||||
/** C-R dynamic pneumatic line (AMESim PNL0001): port 1 is R, port 2 is C. */
|
||||
export function AmesimPnl0001Symbol() {
|
||||
return (
|
||||
<SymbolSvg className="component-symbol-amesim-pnl0001-svg" domain="pneumatic">
|
||||
<PipeNetworkBody sections={["C", "R"]} />
|
||||
<PipeNetworkBody sections={["R", "C"]} />
|
||||
</SymbolSvg>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2575,6 +2575,14 @@ test("PNL00R 与 PNL0001-0003 使用 standard 画布和 60% 工作区占比", as
|
||||
};
|
||||
});
|
||||
expect(geometry.occupancy).toBeCloseTo(0.6, 4);
|
||||
if (modelType === "amesim_pnl0001") {
|
||||
const causalLabels = symbol.locator("text");
|
||||
await expect(causalLabels).toHaveText(["R", "C"]);
|
||||
const labelPositions = await causalLabels.evaluateAll((labels) =>
|
||||
labels.map((label) => Number(label.getAttribute("x"))),
|
||||
);
|
||||
expect(labelPositions[0]).toBeLessThan(labelPositions[1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user