test(admin): align preload workflow contract

This commit is contained in:
2026-09-02 12:19:48 +08:00
parent 776c0e2ebb
commit 0708b4a262
@@ -5,10 +5,12 @@ import { describe, expect, it } from 'vitest'
const source = readFileSync(resolve(process.cwd(), 'src/modules/unified-orders/workflows/components/SmartLoadingWorkbench.vue'), 'utf8')
describe('SmartLoadingWorkbench business actions', () => {
it('allows preload push before the real container number is available', () => {
expect(source).toContain(':disabled="!canPush || !editable || !plan.items.length || Boolean(action)"')
it('keeps the automatically-created preload plan editable without a legacy push action', () => {
expect(source).toContain("const editable = computed(() => plan.value?.status === 'EDITING')")
expect(source).toContain('自动预装计划缺失')
expect(source).not.toContain('canPush')
expect(source).not.toContain('推送预装')
expect(source).not.toContain('!container?.containerNo')
expect(source).toContain('真实集装箱号可在订舱放舱后补录')
})
it('uses semantic outlined buttons and keeps narrow action cells usable', () => {