diff --git a/frontend/src/componentSymbols/pneumatic.tsx b/frontend/src/componentSymbols/pneumatic.tsx index 6d1c6db..859f88a 100644 --- a/frontend/src/componentSymbols/pneumatic.tsx +++ b/frontend/src/componentSymbols/pneumatic.tsx @@ -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 ( - + ); } diff --git a/frontend/tests/e2e/component-symbols.spec.ts b/frontend/tests/e2e/component-symbols.spec.ts index 1194170..4989e97 100644 --- a/frontend/tests/e2e/component-symbols.spec.ts +++ b/frontend/tests/e2e/component-symbols.spec.ts @@ -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]); + } } });