test: 固化动态咨询运行时验收
This commit is contained in:
1 parent
6d2c12c3df
commit
aee1cff5a3
5 files changed
+68
-1
No files matched your search
@@ -0,0 +1,19 @@
|
||||
# 动态咨询运行时闭环
|
||||
|
||||
## 目标
|
||||
|
||||
在个人品牌主线下,完成跨行业可复用的动态咨询 / 报价提交闭环:表单由 Runtime Workspace 声明,后端负责品牌隔离、校验和状态,后台负责运营跟进,小程序负责渲染和提交。
|
||||
|
||||
## 交付边界
|
||||
|
||||
- 不新增行业专属页面分支。
|
||||
- 不把客户身份、品牌标识交给客户端决定。
|
||||
- 每个 API 行为必须覆盖未授权、错误状态和成功路径。
|
||||
- 每个阶段完成后运行对应 typecheck、integration test、build 或 fixture 验证。
|
||||
|
||||
## 验收
|
||||
|
||||
- 动态字段类型、选项和版本快照可用。
|
||||
- 客户只能读取自己的、当前品牌的提交。
|
||||
- 后台可以筛选、查看和更新咨询状态。
|
||||
- 小程序提交失败、空态、成功回执均明确。
|
||||
@@ -0,0 +1,22 @@
|
||||
# 进度
|
||||
|
||||
## 当前状态
|
||||
|
||||
- 任务:动态咨询运行时闭环
|
||||
- 形态:epic
|
||||
- 进度:3/3 子任务完成
|
||||
- 当前:全部子任务完成
|
||||
- 真相文件:`SUBTASKS.csv`
|
||||
|
||||
## 已完成
|
||||
|
||||
- 真实咨询 / 报价提交。
|
||||
- 客户身份和品牌隔离。
|
||||
- 客户记录列表与详情查询。
|
||||
- Runtime 字段类型渲染。
|
||||
- 后台动态咨询详情、筛选、状态更新和失败重试。
|
||||
- 字段选项 Runtime 契约回归测试。
|
||||
|
||||
## 恢复说明
|
||||
|
||||
下一次继续前先读取 `EPIC.md`、`SUBTASKS.csv` 和本文件,确认第一个非 `DONE` 子任务。
|
||||
@@ -0,0 +1,4 @@
|
||||
id,title,task_type,depends_on,status,task_dir,acceptance_criteria,validation_command,notes
|
||||
1,运行时表单字段契约,single-full,,DONE,tasks/runtime-fields,字段类型和选项由 Runtime Workspace 下发并渲染,pnpm --filter @personal-brand/api test:integration && pnpm --filter @personal-brand/miniapp test:fixture,已在 6d2c12c 完成
|
||||
2,客户提交与记录隔离,single-full,1,DONE,tasks/customer-submissions,客户提交真实入库且只能访问自身品牌记录,pnpm --filter @personal-brand/api test:integration,已在 ba0069a 和 3186757 完成
|
||||
3,后台运营与回归收口,single-full,2,DONE,tasks/admin-operations,后台筛选详情状态更新和失败重试可用,pnpm --filter @personal-brand/admin build && git diff --check,已完成并通过全量回归
|
||||
|
@@ -0,0 +1,10 @@
|
||||
# 后台运营与回归收口
|
||||
|
||||
状态:DONE
|
||||
|
||||
待验证:
|
||||
|
||||
- Admin production build。
|
||||
- API integration test。
|
||||
- 修改文件格式检查。
|
||||
- 完整提交并更新父级 `SUBTASKS.csv`。
|
||||
@@ -463,7 +463,15 @@ test("admin can create and version an inquiry form", async () => {
|
||||
method: "PATCH",
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
payload: {
|
||||
fieldsSnapshot: [{ key: "budget", type: "number", label: "预算", required: true }],
|
||||
fieldsSnapshot: [
|
||||
{ key: "budget", type: "number", label: "预算", required: true },
|
||||
{
|
||||
key: "contactMethod",
|
||||
type: "select",
|
||||
label: "联系渠道",
|
||||
options: [{ label: "微信", value: "wechat" }],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
assert.equal(updated.statusCode, 200);
|
||||
@@ -511,6 +519,10 @@ test("admin can create and version an inquiry form", async () => {
|
||||
(form) => form.key === id && form.targetId === offering.id,
|
||||
),
|
||||
);
|
||||
const runtimeForm = JSON.parse(publicWorkspace.body).inquiryForms.find(
|
||||
(form) => form.key === id,
|
||||
);
|
||||
assert.deepEqual(runtimeForm.fields[1].options, [{ label: "微信", value: "wechat" }]);
|
||||
const submission = await request("/customer/inquiry-submissions", {
|
||||
method: "POST",
|
||||
headers: { authorization: `Bearer ${customerToken}` },
|
||||
|
||||
Reference in new issue
Block a user