fix(oa): remove DDAttachment from unsupported table and use testseam.Swap to #666

- 从 oa-form-components.md (mono/multi) 的"API 不支持的控件"表中移除 DDAttachment,避免 Agent 误判为不支持
- computeFileMD5 测试注入改为 testseam.Swap,符合仓库包变量注入约定
This commit is contained in:
昭逸 committed 2026-08-21 09:56:48 +08:00
1 parent d59d1091dc
commit dc37dd2c34
3 files changed
+2 -6

No files matched your search

+2 -4
View File
@@ -686,11 +686,9 @@ func TestCrossPlatformCoverageOAAttachmentUploadMD5Failure(t *testing.T) {
filePath, _ := writeOAAttachmentTempFile(t, "test.bin", "hello")
put := mockOAAttachmentPut(t)
original := computeFileMD5
computeFileMD5 = func(string) (string, error) {
testseam.Swap(t, &computeFileMD5, func(string) (string, error) {
return "", errors.New("permission denied")
}
t.Cleanup(func() { computeFileMD5 = original })
})
caller := &scriptedToolCaller{format: "json"}
_, err := executeOAAttachmentCommandCapturingOutput(t, caller,
@@ -328,7 +328,6 @@
| 流水号 | `SeqNumberField` | 由系统自动生成 |
| OCR 文本识别 | `OcrTextField` | 需要客户端 OCR 交互 |
| OCR 身份证识别 | `OcrIdCardField` | 需要客户端 OCR 交互 |
| 附件控件 | `DDAttachment` | 已支持:value 需要 spaceId、fileName、fileSize、fileType、fileId,先用 `dws oa approval attachment upload --file <path>` 上传获取再组装提交 |
> **部分支持的控件:** `DDPhotoField`(图片控件)**支持通过 URL 直接提交**,但不支持本地文件上传(CLI 未封装钉盘 CDN 上传流程)。若用户只有本地文件,需告知在钉钉客户端补充。详见本文 [DDPhotoField](#ddphotofield图片控件) 章节。
@@ -328,7 +328,6 @@
| 流水号 | `SeqNumberField` | 由系统自动生成 |
| OCR 文本识别 | `OcrTextField` | 需要客户端 OCR 交互 |
| OCR 身份证识别 | `OcrIdCardField` | 需要客户端 OCR 交互 |
| 附件控件 | `DDAttachment` | 已支持:value 需要 spaceId、fileName、fileSize、fileType、fileId,先用 `dws oa approval attachment upload --file <path>` 上传获取再组装提交 |
> **部分支持的控件:** `DDPhotoField`(图片控件)**支持通过 URL 直接提交**,但不支持本地文件上传(CLI 未封装钉盘 CDN 上传流程)。若用户只有本地文件,需告知在钉钉客户端补充。详见本文 [DDPhotoField](#ddphotofield图片控件) 章节。