Files
pda-overseas-uniapp/tests/relabel-completion-gate.test.mjs
T
2026-09-17 13:36:08 +08:00

15 lines
717 B
JavaScript

import test from 'node:test'
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
const page = await readFile(new URL('../src/pages/relabel/relabel.vue', import.meta.url), 'utf8')
test('PDA relabel completion explains pallet and photo blockers instead of silently disabling submit', () => {
assert.match(page, /还不能完成换标/)
assert.match(page, /请先在“换标后组托”中完成本轮已换标箱的拆托合托绑定/)
assert.match(page, /请至少上传 1 张换标完成照片/)
assert.match(page, /:disabled="busy \|\| Boolean\(completionBlockReason\)"/)
assert.match(page, /entry\.action === 'PALLET_BIND'/)
assert.match(page, /detail\.round === round/)
})