待测试

This commit is contained in:
rain
2026-07-27 17:17:31 +08:00
parent 1eae3bbef4
commit 04287e6777
35 changed files with 4238 additions and 22750 deletions
+97
View File
@@ -79,16 +79,30 @@ const run = async () => {
genealogyId: "900001001",
genealogyName: "联调测试家谱",
name: "汤文远",
appUserId: "",
bindingMode: "NONE",
personNo: "",
aliasName: "",
generation: 12,
generationName: "文",
avatarOssId: "",
relation: "家谱成员",
branch: "文字辈",
sex: "MALE",
birthDate: "1900-01-02",
birthLunar: "",
deathDate: "",
deathLunar: "",
years: "1900-01-02—",
birthplace: "祖居地",
deathPlace: "",
burialPlace: "",
spouseNames: "",
personStatus: "ALIVE",
biography: "生平资料",
remark: "",
relationName: "",
sortOrder: null,
status: "normal",
relatives: [
{ id: "900", name: "汤世德", relation: "父亲" },
@@ -103,6 +117,89 @@ const run = async () => {
assert.strictEqual(requests[0].header.Authorization, "Bearer session-1");
assert.strictEqual(requests[0].timeout, 15000);
nextResponse.data.data.birthDate = "1900-01-02 00:00:00";
const spaceDatePerson = await appApi.getPerson("900001001", "1001");
assert.strictEqual(spaceDatePerson.birthDate, "1900-01-02");
nextResponse = {
statusCode: 200,
data: { code: 200, data: null },
};
await appApi.createPerson("900001001", {
bindingMode: "SPECIFIED",
appUserId: "3001",
personNo: "P-001",
name: "OSS头像成员",
aliasName: "阿汤",
sex: "0",
generation: 1,
generationName: "文",
fatherId: "3002",
motherId: "3003",
avatarOssId: "9007199254740993",
birthDate: "1900-01-02",
birthLunar: "0",
birthPlace: "祖居地",
deathDate: "2000-01-02",
deathLunar: "1",
deathPlace: "故乡",
burialPlace: "祖茔",
personStatus: "0",
biography: "成员简介",
remark: "测试备注",
sortOrder: "2",
relationName: "配偶",
});
assert.deepStrictEqual(requests.at(-1).data, {
bindingMode: "SPECIFIED",
appUserId: "3001",
personNo: "P-001",
name: "OSS头像成员",
aliasName: "阿汤",
sex: "0",
generation: 1,
generationName: "文",
fatherId: "3002",
motherId: "3003",
avatarOssId: "9007199254740993",
birthDate: "1900-01-02",
birthLunar: "0",
birthPlace: "祖居地",
deathDate: "2000-01-02",
deathLunar: "1",
deathPlace: "故乡",
burialPlace: "祖茔",
personStatus: "0",
biography: "成员简介",
remark: "测试备注",
sortOrder: 2,
relationName: "配偶",
});
await assert.rejects(
appApi.createPerson("900001001", {
bindingMode: "NONE",
name: "错误头像成员",
generation: 1,
avatarOssId: 9007199254740992,
}),
/OSS ID 字符串/,
);
await assert.rejects(
appApi.createPerson("900001001", {
bindingMode: "SELF",
appUserId: "3001",
name: "错误绑定成员",
}),
/SELF 身份认领不能提供业务用户标识/,
);
await assert.rejects(
appApi.createPerson("900001001", {
bindingMode: "SPECIFIED",
name: "缺少指定用户成员",
}),
/指定业务用户绑定必须提供业务用户标识/,
);
nextResponse = {
statusCode: 200,
data: {