现有组件功能与Amesim组件比较对齐,补全功能;仿真服务启动环境检测,旧版json工程文件适配读取
This commit is contained in:
1 parent
b6c22a54f8
commit
6fc9afe41d
119 files changed
+260114
-351
No files matched your search
@@ -733,7 +733,7 @@ test("MECMAS21 当前参数编码由工程版本统一并写入 XML", async ({
|
||||
}),
|
||||
);
|
||||
expect(savedContracts).toContainEqual({
|
||||
projectSchemaVersion: 1,
|
||||
projectSchemaVersion: 2,
|
||||
modelVersion: "0.2.0",
|
||||
});
|
||||
|
||||
@@ -883,7 +883,7 @@ test("MECMAS21 旧的 0/1 编码不转换并阻止执行", async ({
|
||||
await expect(consolePanel).toContainText("模型检查发现");
|
||||
});
|
||||
|
||||
test("缺失模型版本保留来源并补当前默认值,生成 XML 只警告", async ({
|
||||
test("缺失模型版本加载时警告并补默认值,保存时升级当前版本", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.goto("/");
|
||||
@@ -926,7 +926,7 @@ test("缺失模型版本保留来源并补当前默认值,生成 XML 只警告
|
||||
await expect(node.locator('[data-model-contract-compatible="true"]')).toBeVisible();
|
||||
await expect(node.getByLabel(/模型合同不兼容/)).toHaveCount(0);
|
||||
await page.getByRole("button", { name: "保存工程", exact: true }).click();
|
||||
const persistedWithoutDefaults = await page.evaluate(() => {
|
||||
const persistedWithCurrentVersion = await page.evaluate(() => {
|
||||
const key = Object.keys(window.localStorage).find((candidate) =>
|
||||
candidate.startsWith("system-simulation-flow:project:"),
|
||||
);
|
||||
@@ -948,12 +948,12 @@ test("缺失模型版本保留来源并补当前默认值,生成 XML 只警告
|
||||
)?.data;
|
||||
return Boolean(
|
||||
data &&
|
||||
data.modelVersion === undefined &&
|
||||
data.modelVersion === "0.2.0" &&
|
||||
data.parameters &&
|
||||
("strib" in data.parameters),
|
||||
);
|
||||
});
|
||||
expect(persistedWithoutDefaults).toBe(true);
|
||||
expect(persistedWithCurrentVersion).toBe(true);
|
||||
|
||||
const consolePanel = page.getByRole("complementary", {
|
||||
name: "仿真控制台",
|
||||
|
||||
Reference in new issue
Block a user