优化
This commit is contained in:
@@ -5,14 +5,18 @@ import { readFile } from 'node:fs/promises'
|
||||
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8')
|
||||
|
||||
test('overseas PDA is an independent Vue 3 app with separate packaging identity', async () => {
|
||||
const [manifest, pages, pkg] = await Promise.all([
|
||||
read('../src/manifest.json'), read('../src/pages.json'), read('../package.json')
|
||||
const [manifest, pages, pkg, vite] = await Promise.all([
|
||||
read('../src/manifest.json'), read('../src/pages.json'), read('../package.json'), read('../vite.config.js')
|
||||
])
|
||||
assert.match(manifest, /"name"\s*:\s*"柏悦物流\s*PDA\s*海外版"/)
|
||||
assert.match(manifest, /"packagename"\s*:\s*"com\.baiyuelogistics\.pda\.overseas"/)
|
||||
assert.match(manifest, /"vueVersion"\s*:\s*"3"/)
|
||||
assert.doesNotMatch(pages, /pages\/picking|pages\/tasks/)
|
||||
assert.match(pkg, /"build:app"\s*:\s*"uni build -p app"/)
|
||||
assert.match(vite, /API_PROXY_TARGET/)
|
||||
assert.match(vite, /OVERSEAS_API_PROXY_TARGET/)
|
||||
assert.match(vite, /\/overseas-api/)
|
||||
assert.match(vite, /replace\(\/\^\\\/overseas-api\//)
|
||||
})
|
||||
|
||||
test('overseas workbench contains only confirmed inbound and in-warehouse domains', async () => {
|
||||
@@ -34,6 +38,9 @@ test('login has no committed demo credentials and inbound operation implements t
|
||||
assert.doesNotMatch(login, /ChangeMe|platform_admin/)
|
||||
assert.match(login, /DEV_LOGIN\.username|DEV_LOGIN\.password/)
|
||||
assert.match(runtime, /runtimeEnvironment\.DEV|VITE_PDA_DEV_USERNAME|VITE_PDA_DEV_PASSWORD/)
|
||||
assert.match(runtime, /'\/overseas-api'/)
|
||||
assert.match(runtime, /#ifdef H5[\s\S]*?VITE_H5_AUTH_API_BASE_URL/)
|
||||
assert.match(runtime, /#ifdef H5[\s\S]*?VITE_H5_OVERSEAS_API_BASE_URL/)
|
||||
assert.match(operation, /startScanBroadcast/)
|
||||
for (const action of ['prepareReceivingContainer', 'getCurrentReceiving', 'resolveCurrentSku', 'resolveCurrentCarton', 'resolveCurrentPallet', 'receiveCurrentBulk', 'receiveCurrentCarton', 'completeCurrentReceiving']) assert.match(operation, new RegExp(action))
|
||||
for (const path of ['/candidates', '/prepare', '/unload-photos/files', '/sign', '/skus/resolve', '/cartons/resolve', '/pallets/resolve', '/receipts/bulk', '/receipts/carton', '/complete']) assert.match(inbound, new RegExp(path.replaceAll('/', '\\/')))
|
||||
|
||||
Reference in New Issue
Block a user