feat(huya): 协作台账支持皮肤筛选与主页截图拖拽/粘贴上传
- 外部单列表新增礼包/皮肤精确筛选,并提供去重下拉选项 - 主页截图支持拖拽、多选及 Ctrl/Cmd+V 剪贴板粘贴上传
This commit is contained in:
@@ -1433,6 +1433,33 @@ class TestCollabKeywordSearch(TestCollabBase):
|
||||
assert self._search("查不到的东西") == []
|
||||
|
||||
|
||||
class TestCollabGiftFilter(TestCollabBase):
|
||||
"""按礼包/皮肤筛选:下拉选项去重,查询按礼包名精确匹配。"""
|
||||
|
||||
def test_list_orders_filters_by_exact_gift_name(self):
|
||||
target = self._create(order_no="G-1", gift_name="天网终结者大礼包")
|
||||
self._create(order_no="G-2", gift_name="套装-纯白跃动")
|
||||
|
||||
rows, total = collab.list_orders(self.db, gift_name="天网终结者大礼包")
|
||||
assert total == 1
|
||||
assert [row.id for row in rows] == [target.id]
|
||||
|
||||
# 筛选项是点选值,不做模糊匹配(模糊搜索仍走 keyword)
|
||||
rows, total = collab.list_orders(self.db, gift_name="天网")
|
||||
assert total == 0
|
||||
assert rows == []
|
||||
|
||||
def test_gift_names_are_unique_sorted_and_ignore_empty(self):
|
||||
self._create(order_no="G-3", gift_name="套装-纯白跃动")
|
||||
self._create(order_no="G-4", gift_name="套装-纯白跃动")
|
||||
self._create(order_no="G-5", gift_name="天网终结者大礼包")
|
||||
self._create(order_no="G-6", gift_name="")
|
||||
|
||||
assert collab.list_gift_names(self.db) == sorted(
|
||||
["套装-纯白跃动", "天网终结者大礼包"]
|
||||
)
|
||||
|
||||
|
||||
class TestCollabBuyerCluster(TestCollabBase):
|
||||
"""同一买家的多单:按「绑定账号 + 绑定角色」软识别(只读派生,不动 uid 唯一性)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user