fix: 修复独立工坊业务详情区块字段过滤
CI / Static checks (pull_request) Successful in 1m10s
CI / Browser smoke (pull_request) Failing after 1m49s
CI / API integration (pull_request) Successful in 1m4s
CI / Production build (pull_request) Successful in 1m28s

This commit is contained in:
que01 committed 2026-10-25 10:41:04 +08:00
1 parent 61f216ae0e
commit 8f252d088a
15 files changed
+553 -145

No files matched your search

@@ -253,9 +253,14 @@ test("业务编辑弹窗预览列表与详情详情同一份内容", async ({ pa
await page.getByRole("button", { name: "编辑详情" }).first().click();
await expect(page.locator(".component-template-preview")).toBeVisible();
// 弹窗默认定位在详情页;跨入口编辑列表卡片前先切到列表并点选卡片,
// 确保“在小程序页面编辑”携带的是首页列表区域而不是详情区域。
await page.getByText("列表卡片", { exact: true }).click();
await preview.locator(".offering-card .dish-name").click();
await expect(page.getByText("业务卡片对应字段", { exact: true })).toBeVisible();
await page.getByRole("button", { name: "在小程序页面编辑" }).click();
await expect(page.getByText("页面预览", { exact: true })).toBeVisible({ timeout: 15000 });
await page.getByText("首页业务卡片", { exact: true }).click();
// 跳转时已按 targetKey 自动选中列表卡片区域,无需再手动点选页面区域。
await expect(
page.getByText("正在编辑业务提供项:列表实时预览餐品", { exact: true }),
).toBeVisible();
@@ -274,7 +279,7 @@ test("业务编辑弹窗预览列表与详情详情同一份内容", async ({ pa
.locator(".ant-modal-footer")
.getByRole("button", { name: "确 定", exact: true })
.click();
await expect(page.getByText("业务提供项已保存")).toBeVisible();
await expect(page.getByText("业务提供项已保存").last()).toBeVisible();
expect(savedBody.name).toBe("小程序页保存后的餐品");
expect(savedBody.summary).toBe("跨入口保存后的业务简介");
expect(savedBody.config.details.background).toBe("弹窗编辑后的餐品介绍");