300 lines
19 KiB
JavaScript
300 lines
19 KiB
JavaScript
import test from 'node:test'
|
|
import assert from 'node:assert/strict'
|
|
import { readFile } from 'node:fs/promises'
|
|
|
|
import { fulfillment, fulfillmentIdempotencyKey, releaseFulfillmentKey, resetFulfillmentSession, restoreFulfillmentDraft, updateFulfillmentDraft } from '../src/stores/fulfillment.js'
|
|
import {
|
|
completeDispatchPicking, completeOutboundTask, departDispatch, getDispatchTask, getOutboundTask,
|
|
listDispatchTasks, listOutboundTasks, normalizeDispatchTask, normalizeOutboundTask,
|
|
pickDispatchItem, pickOutboundPallet, pickOutboundTask, resolveOutboundTask, outboundPickPayload, tripDepartureRequest
|
|
} from '../src/api/fulfillment.js'
|
|
import { session } from '../src/stores/session.js'
|
|
import { toDispatchError } from '../src/utils/dispatch-error.js'
|
|
|
|
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
|
|
|
|
test('dispatch merge retains return carton picking and review gates together', async () => {
|
|
const source = (await read('../src/pages/dispatch/dispatch.vue')).match(/<script>([\s\S]*?)<\/script>/)[1]
|
|
const definition = new Function('PortalHeader', 'ScanTargetInput', 'DispatchHandoverStatus',
|
|
source.replace(/^\s*import .*$/gm, '').replace('export default', 'return'))({}, {}, {})
|
|
const state = { current: { canPick: true }, selectedItem: { returnCartons: [{}] },
|
|
selectedReturnCarton: { cartonMark: 'RETURN-BOX' }, selectedPosition: null,
|
|
packages: 1, selectedRemaining: 1, pickingCompleted: false, plannedPackages: 1, remainingPackages: 0 }
|
|
assert.equal(definition.computed.canPick.call(state), true)
|
|
state.selectedReturnCarton = null
|
|
assert.equal(definition.computed.canPick.call(state), false)
|
|
state.selectedItem.returnCartons = []
|
|
state.selectedPosition = { id: 'position' }
|
|
assert.equal(definition.computed.canPick.call(state), true)
|
|
for (const canPick of [false, undefined, 'true']) {
|
|
state.current.canPick = canPick
|
|
assert.equal(definition.computed.canPick.call(state), false)
|
|
assert.equal(definition.computed.canComplete.call(state), false)
|
|
}
|
|
const calls = []
|
|
const deps = { pickDispatchItem: async (...args) => calls.push(args), getDispatchTask: async () => state.current,
|
|
fulfillmentIdempotencyKey: () => ({ value: 'retry-key', signature: 'signature' }), releaseFulfillmentKey() {},
|
|
updateFulfillmentDraft() {}, playSuccessSound() {}, PortalHeader: {}, ScanTargetInput: {}, DispatchHandoverStatus: {} }
|
|
const page = new Function(...Object.keys(deps), source.replace(/^\s*import .*$/gm, '').replace('export default', 'return'))(...Object.values(deps))
|
|
await page.methods.submitPick.call({ canPick: true, current: { dispatchNo: 'DS-RETURN' },
|
|
selectedItem: { dispatchItemId: 'item' }, selectedReturnCarton: { cartonMark: 'RETURN-BOX', productQuantity: 5 },
|
|
run: async (_, work) => work() })
|
|
assert.deepEqual(calls, [['DS-RETURN', 'item', { positionId: null, cartonMark: 'RETURN-BOX', packages: 1, productQuantity: 5, idempotencyKey: 'retry-key' }]])
|
|
})
|
|
|
|
test('trip departure preserves version zero and rejects incomplete trip identity', () => {
|
|
const task = normalizeDispatchTask({ tripNo: 'TR-1', tripRecordVersion: 0, tripDispatchCount: 2, items: [] })
|
|
assert.equal(task.tripRecordVersion, '0')
|
|
assert.equal(task.tripDispatchCount, 2)
|
|
assert.deepEqual(tripDepartureRequest(task, 'departure-key'), { recordVersion: '0', idempotencyKey: 'departure-key', remark: '海外 PDA 整车核平后发车' })
|
|
for (const invalid of [{}, { tripNo: 'TR-1' }, { tripNo: 'TR-1', tripRecordVersion: '-1' }]) assert.throws(() => tripDepartureRequest(invalid, 'key'), /车次信息不完整/)
|
|
})
|
|
|
|
test('whole trip departure UI identifies all members and refreshes server state before releasing retry key', async () => {
|
|
const page = await read('../src/pages/dispatch/dispatch.vue')
|
|
assert.match(page, /current\.tripNo[\s\S]*current\.tripDispatchCount/)
|
|
assert.match(page, /确认整车发车/)
|
|
assert.match(page, /tripDepartureRequest\(this.current, key.value\)/)
|
|
assert.doesNotMatch(page, /status: result\?\.status \|\| 'DEPARTED'/)
|
|
assert.match(page, /result\.dispatches\?\.some[\s\S]*await getDispatchTask[\s\S]*releaseFulfillmentKey/)
|
|
})
|
|
|
|
test('outbound partial pick submits the selected carton and distinguishes shared-pallet items', async () => {
|
|
const first = outboundPickPayload({ outboundPalletItemId: '11' }, { inventoryPositionId: '21', cartonMark: 'BOX-A' }, '1')
|
|
assert.deepEqual(first, { outboundPalletItemId: '11', inventoryPositionId: '21', packages: 1, cartonMarks: ['BOX-A'] })
|
|
assert.notDeepEqual(first, outboundPickPayload({ outboundPalletItemId: '12' }, { inventoryPositionId: '22', cartonMark: 'BOX-B' }, 1))
|
|
assert.deepEqual(outboundPickPayload({ outboundPalletItemId: '13' }, { inventoryPositionId: '23' }, 2).cartonMarks, [])
|
|
const page = await read('../src/pages/outbound/outbound.vue')
|
|
assert.match(page, /listOutboundTasks\('PENDING'\)/)
|
|
assert.match(page, /:key="item.displayKey \|\| item.outboundPalletItemId"/)
|
|
assert.match(page, /outboundPickPayload\(this.selectedItem, this.selectedPosition, this.packages, this.selectedScanCode\)/)
|
|
assert.match(page, /pickOutboundTask\(this.current.taskNo, \{ \.\.\.payload, idempotencyKey: key.value \}\)/)
|
|
assert.match(page, /pickOutboundPallet\(this.current.taskNo, code, \{ idempotencyKey: key.value \}\)/)
|
|
assert.match(page, /item\.palletNo === code/)
|
|
})
|
|
|
|
test('return outbound preserves its task type and only permits pallet scans for pallet items', async () => {
|
|
const task = normalizeOutboundTask({ task: { taskNo: 'PDA-1', outboundType: 'RETURN_OUTBOUND' }, items: [] })
|
|
assert.equal(task.outboundType, 'RETURN_OUTBOUND')
|
|
const page = await read('../src/pages/outbound/outbound.vue')
|
|
assert.match(page, /this\.current\?\.outboundType === 'RETURN_OUTBOUND' && item\.palletNo/)
|
|
assert.match(page, /整托出库请扫描托盘号/)
|
|
const item = { outboundPalletItemId: '12', skuCode: 'SKU-A' }
|
|
const position = { inventoryPositionId: '', cartonMark: 'RC-1' }
|
|
assert.deepEqual(outboundPickPayload(item, position, 1, 'SKU-A'), {
|
|
outboundPalletItemId: '12', inventoryPositionId: null, packages: 1, cartonMarks: [], skuCode: 'SKU-A'
|
|
})
|
|
assert.deepEqual(outboundPickPayload(item, position, 1, 'RC-1'), {
|
|
outboundPalletItemId: '12', inventoryPositionId: null, packages: 1, cartonMarks: ['RC-1']
|
|
})
|
|
})
|
|
|
|
test('real return-carton DTO remains scannable without inventing a warehouse inventory position or pallet', () => {
|
|
const task = normalizeOutboundTask({ task: { taskNo: 'PDA-RETURN', outboundType: 'RETURN_OUTBOUND', status: 'PENDING' },
|
|
items: [{ outboundPalletItemId: '12', palletNo: null, packageCount: 1, pickedPackageCount: 0,
|
|
positions: [{ inventoryPositionId: null, palletNo: null, cartonMark: 'RC-REAL', inboundCode: 'RT-REAL', availablePackages: 1, pickedPackages: 0 }] }] })
|
|
const item = task.items[0], position = item.positions[0]
|
|
assert.equal(item.palletNo, '')
|
|
assert.equal(position.cartonMark, 'RC-REAL')
|
|
assert.equal(position.availablePackages, 1)
|
|
assert.deepEqual(outboundPickPayload(item, position, 1, 'RC-REAL'), {
|
|
outboundPalletItemId: '12', inventoryPositionId: null, packages: 1, cartonMarks: ['RC-REAL']
|
|
})
|
|
assert.equal(outboundPickPayload(item, { ...position, inventoryPositionId: '2099999999999999999' }, 1).inventoryPositionId, '2099999999999999999')
|
|
})
|
|
|
|
function storageMock() {
|
|
const values = new Map()
|
|
globalThis.uni = {
|
|
setStorageSync(key, value) { values.set(key, structuredClone(value)) },
|
|
getStorageSync(key) { return structuredClone(values.get(key)) },
|
|
removeStorageSync(key) { values.delete(key) }
|
|
}
|
|
return values
|
|
}
|
|
|
|
test('phase-five workbench registers only dispatch and outbound PDA delivery boundaries', async () => {
|
|
const [workbench, pages] = await Promise.all([read('../src/data/overseas-workbench.js'), read('../src/pages.json')])
|
|
assert.match(workbench, /name: '出库履约'/)
|
|
assert.match(workbench, /key: 'dispatchPicking'[\s\S]*available: true[\s\S]*route: '\/pages\/dispatch\/dispatch'/)
|
|
assert.match(workbench, /key: 'outboundPicking'[\s\S]*available: true[\s\S]*route: '\/pages\/outbound\/outbound'/)
|
|
assert.match(pages, /pages\/dispatch\/dispatch/)
|
|
assert.match(pages, /pages\/outbound\/outbound/)
|
|
for (const excluded of ['派送单', '派送状态', '客户回访']) assert.doesNotMatch(workbench, new RegExp(excluded))
|
|
})
|
|
|
|
test('fulfillment API uses dedicated PDA routes and never sends customer or warehouse scope', async () => {
|
|
const api = await read('../src/api/fulfillment.js')
|
|
for (const path of ['dispatches', 'outbound-tasks', '/pick', '/complete', '/depart']) assert.match(api, new RegExp(path.replace('/', '\\/')))
|
|
for (const forbidden of ['customerId', 'warehouseId', 'locationId']) assert.doesNotMatch(api, new RegExp(forbidden))
|
|
assert.match(api, /encodeURIComponent/)
|
|
})
|
|
|
|
test('fulfillment API calls the frozen list detail pick complete and depart routes with exact payloads', async () => {
|
|
const calls = []
|
|
session.apiBase = '/api'; session.token = 'overseas-token'
|
|
globalThis.uni = {
|
|
request(options) {
|
|
calls.push({ method: options.method, url: options.url, data: options.data, authorization: options.header.Authorization })
|
|
let data = {}
|
|
if (options.method === 'GET' && /\/dispatches(?:\?|$)/.test(options.url)) data = []
|
|
else if (options.method === 'GET' && /\/outbound-tasks(?:\?|$)/.test(options.url)) data = []
|
|
else if (options.method === 'GET' && options.url.includes('/dispatches/')) data = { dispatchNo: 'DSP-1', taskNo: 'TASK-1', items: [] }
|
|
else if (options.method === 'GET' && options.url.includes('/outbound-tasks/resolve/')) data = { workflow: 'DISPATCH', dispatchNo: 'DSP-1', outboundNo: 'OUT-1' }
|
|
else if (options.method === 'GET' && options.url.includes('/outbound-tasks/')) data = { task: { taskNo: 'OUT-TASK-1', outboundNo: 'OUT-1' }, items: [] }
|
|
options.success({ statusCode: 200, data: { code: '200', data }, header: {} })
|
|
}
|
|
}
|
|
|
|
await listDispatchTasks('PICKING'); await getDispatchTask('DSP/1')
|
|
await pickDispatchItem('DSP/1', '11', { positionId: '22', packages: 1, productQuantity: 0, idempotencyKey: 'pick-key' })
|
|
await completeDispatchPicking('DSP/1', { idempotencyKey: 'complete-key' })
|
|
await departDispatch('DSP/1', { recordVersion: '4', idempotencyKey: 'depart-key' })
|
|
await listOutboundTasks('PENDING'); await getOutboundTask('OUT/TASK/1')
|
|
await resolveOutboundTask('OUT/1')
|
|
await pickOutboundTask('OUT/TASK/1', { outboundPalletItemId: '33', inventoryPositionId: '44', packages: 1, idempotencyKey: 'out-pick-key' })
|
|
await pickOutboundPallet('OUT/TASK/1', 'DP/1', { idempotencyKey: 'out-pallet-key' })
|
|
await completeOutboundTask('OUT/TASK/1', { idempotencyKey: 'out-complete-key' })
|
|
|
|
assert.equal(calls.length, 11)
|
|
assert.deepEqual(calls.find(call => call.url.endsWith('/depart')).data, { recordVersion: '4', idempotencyKey: 'depart-key' })
|
|
assert.ok(calls.some((call) => call.url.endsWith('/dispatches?status=PICKING')))
|
|
assert.ok(calls.some((call) => call.url.includes('/dispatches/DSP%2F1/items/11/pick')))
|
|
assert.ok(calls.some((call) => call.url.endsWith('/dispatches/DSP%2F1/depart')))
|
|
assert.ok(calls.some((call) => call.url.includes('/outbound-tasks/OUT%2FTASK%2F1/pick')))
|
|
assert.ok(calls.some((call) => call.url.includes('/outbound-tasks/OUT%2FTASK%2F1/pallets/DP%2F1/pick')))
|
|
assert.ok(calls.some((call) => call.url.endsWith('/outbound-tasks/resolve/OUT%2F1')))
|
|
assert.ok(calls.every((call) => call.authorization === 'Bearer overseas-token'))
|
|
assert.ok(calls.every((call) => !/[?&](?:customerId|warehouseId)=/.test(call.url)))
|
|
for (const call of calls) {
|
|
assert.equal(Object.hasOwn(call.data || {}, 'customerId'), false)
|
|
assert.equal(Object.hasOwn(call.data || {}, 'warehouseId'), false)
|
|
}
|
|
const dispatchComplete = calls.find((call) => call.url.endsWith('/dispatches/DSP%2F1/complete'))
|
|
assert.deepEqual(dispatchComplete.data, { idempotencyKey: 'complete-key' })
|
|
})
|
|
|
|
test('dispatch and outbound adapters retain stable business identifiers and count progress', () => {
|
|
const dispatch = normalizeDispatchTask({ taskNo: 'DPT-1', dispatchNo: 'DSP-1', canDepart: false, departBlockReason: '请先在平台完成“转派送”', items: [{ dispatchItemId: 8, palletNo: 'PLT-1', scheduledPackages: 5, pickedPackages: 2, positions: [{ id: 9, availablePackages: 5, pickedPackages: 2 }] }] })
|
|
assert.equal(dispatch.dispatchNo, 'DSP-1')
|
|
assert.equal(dispatch.items[0].palletNo, 'PLT-1')
|
|
assert.equal(dispatch.items[0].positions[0].availablePackages, 5)
|
|
assert.equal(dispatch.canDepart, false)
|
|
assert.equal(dispatch.departBlockReason, '请先在平台完成“转派送”')
|
|
|
|
const outbound = normalizeOutboundTask({ task: { taskNo: 'OUT-TASK-1', outboundNo: 'OUT-1', status: 'PENDING' }, items: [{ outboundPalletItemId: 3, palletNo: 'PLT-2', skuCode: 'SKU-1', inboundCode: 'INB-1', packageCount: 4, pickedPackageCount: 1, status: 'PARTIAL_PICKED', positions: [{ inventoryPositionId: 7, palletNo: 'PLT-2', cartonMark: 'BOX-1', skuCode: 'SKU-1', inboundCode: 'INB-1', availablePackages: 3, pickedPackages: 1 }] }] })
|
|
assert.equal(outbound.taskNo, 'OUT-TASK-1')
|
|
assert.equal(outbound.items[0].palletNo, 'PLT-2')
|
|
assert.equal(outbound.items[0].outboundPalletItemId, '3')
|
|
assert.equal(outbound.items[0].plannedPackages, 4)
|
|
assert.equal(outbound.items[0].pickedPackages, 1)
|
|
assert.equal(outbound.items[0].positions[0].cartonMark, 'BOX-1')
|
|
assert.equal(outbound.items[0].positions[0].availablePackages, 3)
|
|
})
|
|
|
|
test('draft restoration scopes work to the signed-in operator warehouse and retains retry idempotency', () => {
|
|
storageMock(); resetFulfillmentSession()
|
|
assert.equal(restoreFulfillmentDraft('operator-a:warehouse-a'), false)
|
|
updateFulfillmentDraft('dispatch', { currentNo: 'DSP-001', palletCode: 'PLT-001', packages: 3 })
|
|
const first = fulfillmentIdempotencyKey('dispatch', 'pick', { dispatchNo: 'DSP-001', palletNo: 'PLT-001', packages: 3 })
|
|
const retry = fulfillmentIdempotencyKey('dispatch', 'pick', { dispatchNo: 'DSP-001', palletNo: 'PLT-001', packages: 3 })
|
|
assert.equal(retry.value, first.value)
|
|
|
|
fulfillment.dispatch.currentNo = ''
|
|
assert.equal(restoreFulfillmentDraft('operator-a:warehouse-a'), true)
|
|
assert.equal(fulfillment.dispatch.currentNo, 'DSP-001')
|
|
assert.equal(fulfillment.dispatch.pendingKeys[first.signature], first.value)
|
|
|
|
releaseFulfillmentKey('dispatch', first.signature)
|
|
const next = fulfillmentIdempotencyKey('dispatch', 'pick', { dispatchNo: 'DSP-001', palletNo: 'PLT-001', packages: 3 })
|
|
assert.notEqual(next.value, first.value)
|
|
assert.equal(restoreFulfillmentDraft('operator-b:warehouse-a'), false)
|
|
assert.equal(fulfillment.dispatch.currentNo, '')
|
|
})
|
|
|
|
test('pages expose loading empty error offline and permission diagnostics with guarded writes', async () => {
|
|
const [dispatch, outbound] = await Promise.all([read('../src/pages/dispatch/dispatch.vue'), read('../src/pages/outbound/outbound.vue')])
|
|
for (const page of [dispatch, outbound]) {
|
|
assert.match(page, /startScanBroadcast/)
|
|
assert.match(page, /正在加载/)
|
|
assert.match(page, /暂无/)
|
|
assert.match(page, /requestId[\s\S]*traceId/)
|
|
assert.match(page, /error\.network[\s\S]*幂等键/)
|
|
assert.match(page, /fulfillmentIdempotencyKey/)
|
|
assert.match(page, /releaseFulfillmentKey/)
|
|
assert.match(page, /if \(!this\.can/)
|
|
assert.doesNotMatch(page, /模拟成功|静默成功|customerId:|warehouseId:|locationId:/)
|
|
}
|
|
assert.match(dispatch, /completeDispatchPicking/)
|
|
assert.match(dispatch, /toDispatchError/)
|
|
assert.match(dispatch, /this\.remainingPackages === 0/)
|
|
assert.doesNotMatch(dispatch, /partialReason|reason \}/)
|
|
assert.match(dispatch, /this\.pickingCompleted && this\.allPicked && this\.current\?\.canDepart === true && !this\.departed/)
|
|
assert.match(dispatch, /current\.departBlockReason/)
|
|
assert.match(dispatch, /this\.selectedPosition\?\.availablePackages \|\| 0/)
|
|
assert.doesNotMatch(dispatch, /availablePackages - (?:this\.)?selectedPosition.*pickedPackages/)
|
|
assert.match(dispatch, /departDispatch/)
|
|
assert.doesNotMatch(dispatch, /departedNo/)
|
|
assert.match(outbound, /completeOutboundTask/)
|
|
assert.match(outbound, /resolveOutboundTask[\s\S]*workflow === 'DISPATCH'[\s\S]*pages\/dispatch\/dispatch/)
|
|
assert.match(outbound, /整托扫描托盘码,散箱扫描箱唛/)
|
|
assert.match(outbound, /退货整托出库扫托盘码,散箱出库扫箱唛/)
|
|
assert.match(outbound, /if \(!this\.current\) return this\.openScannedTask\(code\)/)
|
|
assert.doesNotMatch(outbound, /if \(!this\.current\)[^\n]*openTask\(code\)/)
|
|
assert.match(outbound, /this\.remainingPackages === 0/)
|
|
assert.match(outbound, /position\.availablePackages <= 0/)
|
|
assert.doesNotMatch(outbound, /position\.availablePackages - position\.pickedPackages/)
|
|
for (const page of [dispatch, outbound]) assert.match(page, /await get(?:Dispatch|Outbound)Task[\s\S]*releaseFulfillmentKey/)
|
|
assert.doesNotMatch(dispatch + outbound, /DeliveryOrder|deliveryStatus|customerVisit|\/deliveries/)
|
|
})
|
|
|
|
test('fulfillment workbench entries open task lists before details and keep explicit cross-workflow resume', async () => {
|
|
const [dispatch, outbound] = await Promise.all([read('../src/pages/dispatch/dispatch.vue'), read('../src/pages/outbound/outbound.vue')])
|
|
assert.match(dispatch, /resumeOnEntry: false/)
|
|
assert.match(dispatch, /onLoad\(options\) \{ this\.resumeOnEntry = options\?\.resume === '1' \}/)
|
|
assert.match(dispatch, /if \(this\.resumeOnEntry && fulfillment\.dispatch\.currentNo\) this\.openTask/)
|
|
assert.match(outbound, /if \(!this\.bootstrapped\) \{ this\.bootstrapped = true; this\.scanCode = ''; this\.loadTasks\(\); return \}/)
|
|
assert.match(outbound, /pages\/dispatch\/dispatch\?resume=1/)
|
|
for (const page of [dispatch, outbound]) {
|
|
assert.match(page, /detail-toolbar/)
|
|
assert.match(page, /上次作业/)
|
|
assert.match(page, /返回列表/)
|
|
}
|
|
})
|
|
|
|
test('dispatch vehicle-plate conflict uses actionable Chinese copy and preserves diagnostics', () => {
|
|
const error = toDispatchError({
|
|
code: 'A0409',
|
|
message: 'Vehicle plate is required before PDA push or picking',
|
|
requestId: 'faccb2ee-5e05-4904-9bef-bc983638b47b',
|
|
traceId: '43ca73abd84fab3e2992aa50e48fb48f'
|
|
}, '提交排车拣货失败')
|
|
assert.deepEqual(error, {
|
|
message: '请先在平台维护车牌信息后再拣货',
|
|
code: 'A0409',
|
|
requestId: 'faccb2ee-5e05-4904-9bef-bc983638b47b',
|
|
traceId: '43ca73abd84fab3e2992aa50e48fb48f',
|
|
network: false
|
|
})
|
|
|
|
const unknown = toDispatchError({ code: 'A0409', message: 'Another dispatch conflict', requestId: 'request-2' }, '失败')
|
|
assert.equal(unknown.message, 'Another dispatch conflict')
|
|
assert.equal(unknown.requestId, 'request-2')
|
|
assert.equal(toDispatchError({ code: 'A0403', message: 'Forbidden' }).message, '当前账号没有海外仓 PDA 作业权限,请联系管理员授权')
|
|
})
|
|
|
|
test('receiving conflict recovery keeps request and trace evidence visible on narrow screens', async () => {
|
|
const operation = await read('../src/pages/operation/operation.vue')
|
|
assert.match(operation, /openContainer\(candidate\)[\s\S]*recoverCurrentAfterConflict\(error, true\)/)
|
|
assert.match(operation, /\.error-card text\{overflow-wrap:anywhere;word-break:break-word\}/)
|
|
})
|
|
|
|
test('dispatch review gate preserves the server decision without treating a string or missing value as approval', async () => {
|
|
assert.equal(normalizeDispatchTask({ canPick: true }).canPick, true)
|
|
for (const canPick of [false, undefined, 'true']) assert.equal(normalizeDispatchTask({ canPick }).canPick, false)
|
|
assert.equal(normalizeDispatchTask({ canPick: false, pickBlockReason: '调度审核已打回:预约待核对' }).pickBlockReason, '调度审核已打回:预约待核对')
|
|
const source = await read('../src/pages/dispatch/dispatch.vue')
|
|
assert.match(source, /canPick\(\) \{ return this.current\?\.canPick === true/)
|
|
assert.match(source, /canComplete\(\) \{ return this.current\?\.canPick === true/)
|
|
})
|