fix: 业务提供项点选后仅显示当前区块字段
CI / Browser smoke (pull_request) Successful in 51s
CI / Static checks (pull_request) Successful in 1m11s
CI / API integration (pull_request) Successful in 1m24s
CI / Production build (pull_request) Successful in 1m50s

This commit is contained in:
que01 committed 2026-10-24 10:37:33 +08:00
1 parent cbbf122280
commit 96c3d3292d
4 files changed
+150 -66

No files matched your search

+13 -3
View File
@@ -195,6 +195,9 @@ test("业务编辑弹窗预览列表与详情详情同一份内容", async ({ pa
"acheng-campus-food.detail.dishDetail",
);
await expect(page.getByText("餐品与服务详情对应字段", { exact: true })).toBeVisible();
await expect(page.getByText("正在编辑「餐品与服务详情」", { exact: true })).toBeVisible();
await expect(page.getByLabel("名称", { exact: true })).toHaveCount(0);
await expect(page.getByLabel("类型", { exact: true })).toHaveCount(0);
await expect(
editor.locator('[data-presentation-binding="offering.config.details.background"]'),
).toHaveClass(/is-preview-active/);
@@ -209,6 +212,9 @@ test("业务编辑弹窗预览列表与详情详情同一份内容", async ({ pa
await preview.locator(".offering-card .dish-name").click();
await expect(page.getByText("业务卡片对应字段", { exact: true })).toBeVisible();
await expect(page.getByText("正在编辑「业务卡片」", { exact: true })).toBeVisible();
await expect(page.getByLabel("类型", { exact: true })).toHaveCount(0);
await expect(page.getByLabel("展示顺序", { exact: true })).toHaveCount(0);
await expect(editor.locator('[data-presentation-binding="offering.name"]')).toHaveClass(
/is-preview-active/,
);
@@ -219,10 +225,14 @@ test("业务编辑弹窗预览列表与详情详情同一份内容", async ({ pa
await preview.locator(".menu-head").click();
await expect(preview).toHaveAttribute("data-active-target", "acheng-campus-food.offerings.menu");
await expect(page.getByText("「菜单页说明」属于页面通用内容", { exact: true })).toBeVisible();
await expect(editor.locator('[data-presentation-binding="offering.name"]')).not.toHaveClass(
/is-preview-active/,
);
await expect(editor.locator('[data-presentation-binding="offering.name"]')).toHaveCount(0);
await expect(editor.getByText("详情主图", { exact: true })).toHaveCount(0);
await expect(page.getByLabel("名称", { exact: true })).toHaveCount(0);
await expect(page.getByLabel("类型", { exact: true })).toHaveCount(0);
await page.getByRole("button", { name: "查看全部字段" }).click();
await expect(page.getByLabel("名称", { exact: true })).toBeVisible();
await expect(page.getByLabel("类型", { exact: true })).toBeVisible();
await preview.locator(".offering-card .dish-name").click();
await expect(page.getByText("业务卡片对应字段", { exact: true })).toBeVisible();