feat(assist-platform): add approve command and support direct link generation for enter

This commit is contained in:
gitea committed 2026-10-21 11:24:26 +08:00
1 parent e98948529e
commit f0fc7148ec
11 files changed
+806 -455

No files matched your search

+22
View File
@@ -149,4 +149,26 @@ describe("CLI Commands - assist-platform (合思协助平台)", () => {
expect(res.stdout).toContain("ID01KrLMQJWdMH");
expect(res.stdout).toContain("12 小时");
});
it("assist-platform approve --dry-run 能够输出工单审批变更预览", async () => {
const runtime = createMockRuntime(tempDir);
runtime.selectedCorp = {
id: "ID01ofWoOC1wiX",
name: "沈玥妍测试企业",
corpId: "ID01ofWoOC1wiX",
credentials: { accessToken: "mock-token" },
} as any;
const parsed: CliParsedArgs = {
action: "approve",
args: ["ID01Xeno3GpoNV"],
options: { dryRun: true },
raw: ["assist-platform", "approve", "ID01Xeno3GpoNV", "--dry-run"],
};
const res = await handleAssistPlatformCommand(parsed, runtime);
expect(res.stdout).toContain("[DRY-RUN]");
expect(res.stdout).toContain("ID01Xeno3GpoNV");
expect(res.stdout).toContain("同意授权");
});
});