feat: 增加蝦皮店铺图片筛选 (#150)
This commit is contained in:
@@ -193,6 +193,27 @@ func TestShopeePage_展示主图店铺且保留标题宽度(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestShopeePage_店铺图片三态筛选和状态保留(t *testing.T) {
|
||||
list, err := os.ReadFile("templates/shopee/list.html")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
detail, err := os.ReadFile("templates/shopee/detail_modal.html")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
content := string(list) + string(detail)
|
||||
for _, want := range []string{
|
||||
`<label for="shop">店铺</label>`, `name="shop"`, `.ShopOptions`, `.ShopFilter`,
|
||||
`<label for="image">图片</label>`, `name="image"`, `.ImageOptions`, `.ImageFilter`,
|
||||
`清除筛选条件`,
|
||||
} {
|
||||
if !strings.Contains(content, want) {
|
||||
t.Errorf("蝦皮三态筛选界面缺少 %q", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestShopeeImportRoute_已移除(t *testing.T) {
|
||||
router, err := newRouter(nil)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user