feat(shipping-notice): 增强订单抽取功能,添加进度事件和诊断运行管理,优化数据模型和访问控制
This commit is contained in:
1 parent
ce26d6d0c4
commit
c4095b08da
175 files changed
+13064
-1814
No files matched your search
@@ -10,24 +10,26 @@ import { adminRoutes } from '@/app/router/routes/admin.routes';
|
||||
import { SHIPPING_CONFIG_SUB_MODULE_METAS } from './constants/modules';
|
||||
|
||||
const shippingRoutes = adminRoutes[0].children?.filter((route) =>
|
||||
route.name === 'AdminShippingInventory' || route.name === 'AdminShippingIdentityRules',
|
||||
route.name === 'AdminShippingInventory' || route.name === 'AdminShippingIdentityRules' || route.name === 'AdminShippingOrderExtractionRuns',
|
||||
) ?? [];
|
||||
|
||||
describe('shipping configuration navigation contract', () => {
|
||||
it('registers inventory and identity rules as the only shipping configuration subpages', () => {
|
||||
it('registers all shipping configuration subpages with discoverable deep links', () => {
|
||||
// 关键断言:导航注册表与深链路由必须一一对应,避免后台入口不可发现。
|
||||
expect(SHIPPING_CONFIG_SUB_MODULE_METAS).toEqual([
|
||||
{ id: 'inventory', routeName: 'AdminShippingInventory', path: 'shipping-notice', labelKey: 'admin.nav.shippingInventory' },
|
||||
{ id: 'identity_rules', routeName: 'AdminShippingIdentityRules', path: 'shipping-identity-rules', labelKey: 'admin.nav.shippingIdentityRules' },
|
||||
{ id: 'order_extraction_runs', routeName: 'AdminShippingOrderExtractionRuns', path: 'shipping-order-extraction-runs', labelKey: 'admin.nav.shippingOrderExtractionRuns' },
|
||||
]);
|
||||
expect(shippingRoutes).toHaveLength(2);
|
||||
expect(shippingRoutes).toHaveLength(3);
|
||||
});
|
||||
|
||||
it('keeps both deep links behind the shared shipping inventory admin boundary', () => {
|
||||
// 关键断言:菜单可见性不是授权;两个页面均须保留 requiresAdmin 和共享模块权限标识。
|
||||
it('keeps all deep links behind the shared shipping inventory admin boundary', () => {
|
||||
// 关键断言:菜单可见性不是授权;所有页面均须保留 requiresAdmin 和共享模块权限标识。
|
||||
expect(shippingRoutes.map((route) => route.meta)).toEqual([
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'inventory' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'identity_rules' }),
|
||||
expect.objectContaining({ requiresAdmin: true, adminModule: 'shipping_inventory', adminSubModule: 'order_extraction_runs' }),
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user