feat: 支持蝦皮批量创建 PDD 采集任务 (#185)

This commit is contained in:
chengma
2026-08-12 16:12:35 +08:00
parent 250998b7b9
commit 07ca1b0afb
10 changed files with 280 additions and 26 deletions
+18
View File
@@ -234,6 +234,24 @@ func TestShopeePage_移除Excel入口且保留目录记录入口(t *testing.T) {
}
}
func TestShopeePage_批量创建Pdd采集任务入口(t *testing.T) {
content, err := os.ReadFile("templates/shopee/list.html")
if err != nil {
t.Fatal(err)
}
page := string(content)
for _, want := range []string{
`action="/shopee/collect-batch"`, `data-modal-open="shopee-collect-modal"`,
`data-collect-form="shopee-collect-form"`, `form="shopee-collect-form"`,
`<label for="shopee-collect-client">执行客户端</label>`,
`不指定(任意客户端可领取)`, `.AssignableClients`, `data-collect-submit`,
} {
if !strings.Contains(page, want) {
t.Errorf("蝦皮批量采集入口缺少 %q", want)
}
}
}
func TestShopeeDetail_区分顺运宝观测与正式SKU(t *testing.T) {
content, err := os.ReadFile("templates/shopee/detail_modal.html")
if err != nil {