it('uses formal shared list and centered dialog components',()=>{expect(source).toContain('QueryToolbar');expect(source).toContain('DataTable');expect(source).toContain('AppDialog');expect(source).toContain("fixed: 'left'");expect(source).toContain('width="min(720px, calc(100vw - 28px))"')})
it('gates create actions with backend permissions',()=>{expect(source).toContain("access.can('platform:domestic-container:inbound:create')");expect(source).toContain("access.can('platform:domestic-container:outbound:create')")})
it('loads only active domestic warehouse candidates and surfaces errors',()=>{expect(source).toContain("listAllPlatformWarehouses({ warehouseType: 'DOMESTIC', status: 'ACTIVE' })");expect(source).toContain('国内仓候选加载失败')})
it('keeps idempotency key stable through retry and handles conflicts by refreshing inventory',()=>{expect(source).toContain('idempotencyKey.value');expect(source).toContain("submitError.value.code === 'A0409'");expect(source).toContain('await loadCandidates()');expect(source).not.toContain('localStorage')})
it('reuses the order-list tab panel and keyboard interaction',()=>{expect(source).toContain('class="business-query-panel"');expect(source).toContain('role="tablist"');expect(source).toContain('role="tab"');expect(source).toContain('handleTabKeydown');expect(source).toContain(".status-tab.is-active::after{background:var(--cc-primary)}");expect(source).not.toContain('<el-tabs')})
it('keeps desktop filters and actions on one row with explicit field widths',()=>{expect(source).toContain("key: 'warehouseId', type: 'select', width: 210");expect(source).toContain("key: 'orderNo', type: 'input', width: 220");expect(source).toContain("key: 'containerNo', type: 'input', width: 220");expect(source).toContain("key: 'cargoName', type: 'input', width: 220");expect(source).toContain("key: 'status', type: 'select', width: 180")})
it('uses the shared query toolbar flow without a page-level layout override',()=>{expect(source).not.toContain('.query-toolbar__filters')})
it('does not offer an inventory detail action before an inbound has formed inventory',()=>{expect(source).toContain("canViewInventory(row as ContainerOrder | InventoryRecord)");expect(source).toContain("row.status === 'COMPLETED'")})
it('matches backend numeric and container-number input boundaries before submit',()=>{expect(source).toContain("pattern: /^[A-Za-z0-9-]{4,32}$/");expect(source).toContain(':max="999999999"');expect(source).toContain(':max="999999999999.9999"')})
it('requires a refreshed inventory version for completed outbound submission',()=>{expect(source).toContain("outboundForm.inventoryVersion == null");expect(source).toContain('库存版本未就绪,请重新选择集装箱')})