优化
This commit is contained in:
@@ -38,7 +38,7 @@ test('login has no committed demo credentials and inbound operation implements t
|
||||
read('../src/pages/login/login.vue'), read('../src/config/runtime.js'),
|
||||
read('../src/pages/operation/operation.vue'), read('../src/api/inbound.js'), read('../src/api/receiving-adapter.js'), read('../src/api/overseas.js')
|
||||
])
|
||||
assert.match(login, /\$t\('app\.title'\)/)
|
||||
assert.match(login, /柏悦物流海外版/)
|
||||
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/)
|
||||
@@ -66,9 +66,9 @@ test('unimplemented warehouse operations cannot submit prototype scans', async (
|
||||
read('../src/pages/operation/operation.vue'), read('../src/pages/home/home.vue'), read('../src/pages/module/module.vue')
|
||||
])
|
||||
assert.doesNotMatch(operation, /prototypeScan|prototypeInput/)
|
||||
assert.match(operation, /operation\.unavailableTitle|operation\.unavailableDescription/)
|
||||
assert.match(home, /common\.unavailable/)
|
||||
assert.match(module, /module\.onlyReceiving/)
|
||||
assert.match(operation, /功能暂未开放|扫码不会提交/)
|
||||
assert.match(home, /暂未开放/)
|
||||
assert.match(module, /当前仅开放拆柜收货,其他作业暂未开放/)
|
||||
})
|
||||
|
||||
test('receiving phases use a compiled container summary with cabinet and aggregate facts', async () => {
|
||||
@@ -78,20 +78,22 @@ test('receiving phases use a compiled container summary with cabinet and aggrega
|
||||
assert.match(operation, /import ReceivingSessionSummary/)
|
||||
assert.equal((operation.match(/<ReceivingSessionSummary/g) || []).length, 3)
|
||||
assert.doesNotMatch(operation, /const SessionSummary|template:\s*`<view class="container-card summary-card/)
|
||||
for (const fact of ['containerNo', 'inboundCodeCount', 'plannedPalletCount', 'destinationSummary', 'totalPackages', 'receivedPackages', 'pendingPackages']) assert.match(summary, new RegExp(fact))
|
||||
for (const fact of ['containerNo', 'inboundCodeCount', 'plannedPalletCount', 'destinationValues', 'totalPackages', 'receivedPackages', 'pendingPackages']) assert.match(summary, new RegExp(fact))
|
||||
assert.match(summary, /receiving-summary-metrics/)
|
||||
assert.match(summary, /grid-template-columns:repeat\(4/)
|
||||
assert.match(summary, /padding:10px 12px/)
|
||||
assert.match(summary, /destination-tags\{[^}]*flex-wrap:wrap/)
|
||||
assert.doesNotMatch(summary, /destinationSummary|text-overflow:ellipsis/)
|
||||
})
|
||||
|
||||
test('Chinese English and Spanish locale resources are installed and selectable', async () => {
|
||||
test('Chinese English and Spanish locale scaffolding is installed without exposing unfinished translations', async () => {
|
||||
const [main, i18n, zh, en, es, profile, inbound] = await Promise.all([
|
||||
read('../src/main.js'), read('../src/i18n/index.js'), read('../src/i18n/locales/zh-CN.js'),
|
||||
read('../src/i18n/locales/en.js'), read('../src/i18n/locales/es.js'), read('../src/pages/profile/profile.vue'), read('../src/api/inbound.js')
|
||||
])
|
||||
assert.match(main, /app\.use\(i18n\)/)
|
||||
for (const locale of [zh, en, es]) for (const key of ['operationPhase', 'receivingSummary', 'warehouseOperator']) assert.match(locale, new RegExp(key))
|
||||
for (const locale of [zh, en, es]) assert.match(locale, /export default \{\}/)
|
||||
assert.match(i18n, /SUPPORTED_LOCALES = \['zh-CN', 'en', 'es'\]/)
|
||||
assert.match(profile, /setLocale|LOCALE_OPTIONS/)
|
||||
assert.doesNotMatch(profile, /setLocale|LOCALE_OPTIONS|profile\.language/)
|
||||
assert.match(inbound, /warehouse-profile/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user