feat: 支持人工修改蝦皮规格 (#215)

This commit is contained in:
chengma
2026-08-13 12:14:02 +08:00
parent 5b7d92289e
commit 4752fef54f
16 changed files with 403 additions and 34 deletions
+21
View File
@@ -385,6 +385,27 @@ func TestShopeePage_展示主图店铺且保留标题宽度(t *testing.T) {
}
}
func TestShopeeDetail_现有SKU支持渐进式人工编辑(t *testing.T) {
detail, err := os.ReadFile("templates/shopee/detail_modal.html")
if err != nil {
t.Fatal(err)
}
routes, err := os.ReadFile("handler/web/web.go")
if err != nil {
t.Fatal(err)
}
content := string(detail) + string(routes)
for _, want := range []string{
`action="/shopee/spec/save"`, `name="sku_record_id"`, `name="open_id"`,
`name="color"`, `name="size"`, `name="advice"`, `maxlength="500"`,
`规格原文和 SKU 身份不会修改`, `pages.POST("/shopee/spec/save"`,
} {
if !strings.Contains(content, want) {
t.Errorf("蝦皮规格编辑界面或路由缺少 %q", want)
}
}
}
func TestShopeePage_分类搜索回收站和状态保留(t *testing.T) {
list, err := os.ReadFile("templates/shopee/list.html")
if err != nil {