进行了一些小优化

This commit is contained in:
2026-08-25 16:33:36 +08:00
parent e5df6fdaa7
commit 4a4009133c
5 changed files with 130 additions and 63 deletions
@@ -367,8 +367,11 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
assert.match(userCenterCreditsCss, /\.uc-asset-tabs,\s*\.uc-asset-tabs\.aksrt-panel\s*\{[^}]*background:\s*var\(--surface-1,\s*#fff\);[^}]*border:[^;}]+;[^}]*box-shadow:[^;}]+;/);
assert.doesNotMatch(profileCredits, /credits-signin\.php|data-aksrt-signin-calendar/);
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden/);
assert.match(profileOrders, /'status'\s*=>\s*\$_GET\['order_status'\]\s*\?\?\s*'all'/);
assert.doesNotMatch(profileOrders, /\$_GET|add_query_arg|name="order_(?:status|type|number|page)"/);
assert.match(profileOrders, /data-aksrt-orders-filter-panel hidden[\s\S]*?aksrt-orders-page__status-filters[\s\S]*?aksrt-orders-page__type-filters/);
assert.match(profileOrders, /data-aksrt-order-filter="status"[\s\S]*?data-aksrt-order-filter="type"/);
assert.match(profileOrders, /data-aksrt-order-page=/);
assert.doesNotMatch(profileOrders, /aksrt-orders-page__(?:filter-chip|page-chip|clear)[^>]*href=/);
assert.doesNotMatch(profileOrders, /aksrt-orders-page__tabs|aksrt-orders-page__tab(?:\s|<|"|')/);
assert.match(ordersCss, /\.aksrt-orders-page__filter-panel\[hidden\]\s*\{\s*display:\s*none\s*!important;/);
assert.match(ordersCss, /\.aksrt-orders-page__status-filters, \.aksrt-orders-page__type-filters/);
@@ -377,8 +380,12 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
assert.doesNotMatch(profileOrders, /can_open|entitlement_label|is-entitlement/);
assert.doesNotMatch(orderCenterJs, /can_open|entitlement_label|is-entitlement/);
assert.doesNotMatch(ordersCss, /is-entitlement/);
assert.match(userCenterJs, /name === 'follow' \|\| name === 'orders'/);
assert.match(userCenterJs, /\['order_status', 'order_type', 'order_number', 'order_page'\]/);
assert.match(orderCenterJs, /function loadView\(state, patch\)/);
assert.match(orderCenterJs, /data-aksrt-order-filter/);
assert.match(orderCenterJs, /data-aksrt-order-page/);
assert.doesNotMatch(orderCenterJs, /new URL\(window\.location\.href\)/);
assert.doesNotMatch(userCenterJs, /\['order_status', 'order_type', 'order_number', 'order_page'\]/);
assert.match(userCenterJs, /initialTab === 'orders'[\s\S]*?window\.history\.replaceState/);
});
test('public user home stays param-free and swaps panels via REST fragments', () => {