feat: 优化顺运宝同步反馈与记录刷新 (#61)

This commit is contained in:
chengma
2026-08-09 20:41:24 +08:00
parent 59d70b2d64
commit 3fd863da64
7 changed files with 99 additions and 20 deletions
+16
View File
@@ -99,3 +99,19 @@ func TestSybHistoryPagination_保留筛选并重开弹窗(t *testing.T) {
}
}
}
func TestSybHistoryURL_刷新时保留当前页和筛选(t *testing.T) {
location, err := url.Parse(sybHistoryURL(3, "ORDER-1", "2026-08-01", "2026-08-09"))
if err != nil {
t.Fatal(err)
}
query := location.Query()
for name, want := range map[string]string{
"history": "1", "history_page": "3", "order_no": "ORDER-1",
"date_from": "2026-08-01", "date_to": "2026-08-09",
} {
if got := query.Get(name); got != want {
t.Fatalf("刷新链接 %s=%q,期望 %q;URL=%s", name, got, want, location.String())
}
}
}