From ed84074a6063c7013641c074af45eba02c38eea5 Mon Sep 17 00:00:00 2001 From: shuiping233 <49360196+shuiping233@users.noreply.github.com> Date: Tue, 3 Mar 2026 16:01:26 +0800 Subject: [PATCH] =?UTF-8?q?unittest:=20=E6=B7=BB=E5=8A=A0=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E9=81=97=E6=BC=8F=E7=9A=84kook=5Fcard=5Fdata.json=20(?= =?UTF-8?q?#5703)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_kook/.gitignore | 1 + tests/test_kook/data/kook_card_data.json | 100 +++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 tests/test_kook/.gitignore create mode 100644 tests/test_kook/data/kook_card_data.json diff --git a/tests/test_kook/.gitignore b/tests/test_kook/.gitignore new file mode 100644 index 000000000..36798e6f1 --- /dev/null +++ b/tests/test_kook/.gitignore @@ -0,0 +1 @@ +!data \ No newline at end of file diff --git a/tests/test_kook/data/kook_card_data.json b/tests/test_kook/data/kook_card_data.json new file mode 100644 index 000000000..f19bb4080 --- /dev/null +++ b/tests/test_kook/data/kook_card_data.json @@ -0,0 +1,100 @@ +{ + "type": "card", + "theme": "info", + "size": "lg", + "modules": [ + { + "text": { + "content": "test1", + "type": "plain-text", + "emoji": true + }, + "type": "header" + }, + { + "text": { + "content": "test2", + "type": "kmarkdown" + }, + "type": "section", + "mode": "left" + }, + { + "type": "divider" + }, + { + "text": { + "fields": [ + { + "content": "test3", + "type": "kmarkdown" + }, + { + "content": "**test4**", + "type": "kmarkdown" + } + ], + "type": "paragraph", + "cols": 2 + }, + "type": "section", + "mode": "left" + }, + { + "elements": [ + { + "src": "https://img.kookapp.cn/attachments/2023-01/05/63b645851ff19.svg", + "type": "image", + "alt": "", + "size": "lg", + "circle": false + } + ], + "type": "image-group" + }, + { + "src": "https://img.kookapp.cn/attachments/2023-01/05/63b645851ff19.svg", + "title": "test5", + "type": "file" + }, + { + "endTime": 1772343427360, + "type": "countdown", + "startTime": 1772343378259, + "mode": "second" + }, + { + "elements": [ + { + "text": "点我测试回调", + "type": "button", + "theme": "primary", + "value": "btn_clicked", + "click": "return-val" + }, + { + "text": "访问官网", + "type": "button", + "theme": "danger", + "value": "https://www.kookapp.cn", + "click": "link" + } + ], + "type": "action-group" + }, + { + "elements": [ + { + "content": "test6", + "type": "plain-text", + "emoji": true + } + ], + "type": "context" + }, + { + "code": "test7", + "type": "invite" + } + ] +} \ No newline at end of file