fix: 完善顺运宝列表紧凑布局 (#216)
This commit is contained in:
+17
-3
@@ -336,7 +336,7 @@ func TestSybPage_紧凑筛选和可见横向滚动(t *testing.T) {
|
||||
`class="table-wrap syb-table-wrap"`,
|
||||
`class="syb-col-shop"`,
|
||||
`class="syb-col-spec"`,
|
||||
`colspan="12"`,
|
||||
`colspan="11"`,
|
||||
} {
|
||||
if !strings.Contains(pageText, want) {
|
||||
t.Errorf("顺运宝紧凑列表缺少 %q", want)
|
||||
@@ -345,6 +345,8 @@ func TestSybPage_紧凑筛选和可见横向滚动(t *testing.T) {
|
||||
for _, removed := range []string{
|
||||
`href="/shops">店铺管理(同步`,
|
||||
`<th>货运单 ID</th>`,
|
||||
`<th>处理阶段</th>`,
|
||||
`按顺运宝货运单创建日期(UTC+8)同步`,
|
||||
`每行只显示当前最需要完成的下一步`,
|
||||
} {
|
||||
if strings.Contains(pageText, removed) {
|
||||
@@ -359,10 +361,15 @@ func TestSybPage_紧凑筛选和可见横向滚动(t *testing.T) {
|
||||
`.syb-col-spec`,
|
||||
`max-width: 140px`,
|
||||
`.syb-table-wrap`,
|
||||
`max-height: calc(100vh - 270px)`,
|
||||
`flex: 1 1 auto`,
|
||||
`min-height: 0`,
|
||||
`max-height: none`,
|
||||
`overflow: auto`,
|
||||
`.syb-table-wrap thead th`,
|
||||
`position: sticky`,
|
||||
`body.syb-page-body`,
|
||||
`height: 100dvh`,
|
||||
`body.syb-page-body > .page`,
|
||||
} {
|
||||
if !strings.Contains(string(css), want) {
|
||||
t.Errorf("顺运宝紧凑列表样式缺少 %q", want)
|
||||
@@ -371,6 +378,9 @@ func TestSybPage_紧凑筛选和可见横向滚动(t *testing.T) {
|
||||
if !strings.Contains(string(header), `href="/shops"`) {
|
||||
t.Error("移除顺运宝工具条入口后,管理员主导航仍应保留店铺管理模块")
|
||||
}
|
||||
if !strings.Contains(string(header), `class="syb-page-body"`) {
|
||||
t.Error("顺运宝页面缺少专用视口布局类")
|
||||
}
|
||||
}
|
||||
|
||||
func TestShops_单一名称和状态且保护删除(t *testing.T) {
|
||||
@@ -610,7 +620,6 @@ func TestMainPagesReturnOK(t *testing.T) {
|
||||
`data-history-fetch-url=`,
|
||||
`name="date_from"`, `name="date_to"`,
|
||||
`name="stage"`, "处理阶段", `name="shop"`, "店铺", "下一步", `data-detail-url=`,
|
||||
"按顺运宝货运单创建日期(UTC+8)同步",
|
||||
"创建真实采购任务", "所有当前账号可见的客户端均可指派",
|
||||
} {
|
||||
if !strings.Contains(sybResponse.Body.String(), want) {
|
||||
@@ -630,6 +639,11 @@ func TestMainPagesReturnOK(t *testing.T) {
|
||||
if strings.Contains(sybResponse.Body.String(), "指定日期同步") {
|
||||
t.Error("顺运宝页面不应再显示旧的指定日期同步入口")
|
||||
}
|
||||
for _, removed := range []string{"按顺运宝货运单创建日期(UTC+8)同步", `<th>处理阶段</th>`} {
|
||||
if strings.Contains(sybResponse.Body.String(), removed) {
|
||||
t.Errorf("顺运宝页面仍包含已移除内容 %q", removed)
|
||||
}
|
||||
}
|
||||
for _, removed := range []string{`name="execution_mode"`, "采购演练", "仅演练", "支持真实下单",
|
||||
"真实下单安全确认", `name="live_acknowledged"`, `name="live_confirmation"`, `data-confirm-submit=`} {
|
||||
if strings.Contains(sybResponse.Body.String(), removed) {
|
||||
|
||||
Reference in New Issue
Block a user