|
|
|
@@ -65,10 +65,13 @@ test('login has no committed demo credentials and inbound operation implements t
|
|
|
|
|
for (const role of ['LICENSE_PLATE', 'CONTAINER_SEAL', 'DOOR_OPEN']) assert.match(adapter, new RegExp(role))
|
|
|
|
|
for (const forbidden of ['customerId', 'planNo', 'allocationId', 'warehouseId', 'locationId']) assert.doesNotMatch(inbound, new RegExp(forbidden))
|
|
|
|
|
assert.match(operation, /isReceivingConflict|recoverCurrentAfterConflict/)
|
|
|
|
|
assert.match(operation, /isNoCurrentReceiving\(recoveryError\)[\s\S]*该柜已被其他账号选择,列表已刷新/)
|
|
|
|
|
assert.match(operation, /onShow\(\)[\s\S]*this\.phase === 'candidates'[\s\S]*this\.bootstrap\(\)/)
|
|
|
|
|
assert.match(operation, /candidateLoading[\s\S]*candidateError/)
|
|
|
|
|
assert.match(operation, /candidateError\.requestId[\s\S]*candidateError\.traceId/)
|
|
|
|
|
assert.match(operation, /@tap="loadCandidates"[^>]*>重新加载/)
|
|
|
|
|
assert.doesNotMatch(operation, /扫描柜号|查询柜号<\/button>|v-model="containerInput"/)
|
|
|
|
|
assert.match(operation, /phase === 'candidates'[^\n]*请直接点击待卸货集装箱进入详情/)
|
|
|
|
|
assert.match(operation, /async loadCandidates\(feedback = true\)[\s\S]*if \(this\.candidateLoading\) return[\s\S]*this\.candidateError = error/)
|
|
|
|
|
assert.match(operation, /async prepareContainer\(\)[\s\S]*this\.busy\) return/)
|
|
|
|
|
assert.match(operation, /prepareReceivingContainer[\s\S]*releaseIdempotencyKey\(key\.signature\)/)
|
|
|
|
@@ -99,10 +102,22 @@ test('receiving phases use a compiled container summary with cabinet and aggrega
|
|
|
|
|
assert.match(summary, /padding:10px 12px/)
|
|
|
|
|
assert.match(summary, /destination-tags\{[^}]*flex-wrap:wrap/)
|
|
|
|
|
assert.doesNotMatch(summary, /destinationSummary|text-overflow:ellipsis/)
|
|
|
|
|
assert.match(operation, /v-if="phase !== 'receive'" class="receiving-heading"/)
|
|
|
|
|
assert.match(operation, /v-if="phase !== 'candidates' && phase !== 'receive'" class="receiving-heading"/)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test('Chinese English and Spanish locale scaffolding is installed without exposing unfinished translations', async () => {
|
|
|
|
|
test('candidate containers use compact card navigation and a small refresh action', async () => {
|
|
|
|
|
const operation = await read('../src/pages/operation/operation.vue')
|
|
|
|
|
assert.match(operation, /class="container-card container-card-compact"[\s\S]*@tap="openContainer\(item\.containerNo\)"/)
|
|
|
|
|
assert.match(operation, /class="container-detail-link"/)
|
|
|
|
|
assert.doesNotMatch(operation, /<button class="primary-button"[^>]*openContainer\(item\.containerNo\)/)
|
|
|
|
|
assert.match(operation, /class="list-toolbar"><text>共 \{\{ candidates\.length \}\} 柜<\/text>/)
|
|
|
|
|
assert.match(operation, /\.list-toolbar button\{[^}]*height:28px[^}]*min-height:28px/)
|
|
|
|
|
assert.match(operation, /class="candidate-facts"[\s\S]*入仓码[\s\S]*计划托盘[\s\S]*目的仓/)
|
|
|
|
|
assert.match(operation, /class="candidate-destinations"/)
|
|
|
|
|
assert.doesNotMatch(operation, /item\.receivedPackages[\s\S]*item\.totalPackages[\s\S]*progress-fill/)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
test('Chinese English and Spanish locale selection is persisted from profile without claiming unfinished copy is translated', 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')
|
|
|
|
@@ -110,6 +125,9 @@ test('Chinese English and Spanish locale scaffolding is installed without exposi
|
|
|
|
|
assert.match(main, /app\.use\(i18n\)/)
|
|
|
|
|
for (const locale of [zh, en, es]) assert.match(locale, /export default \{\}/)
|
|
|
|
|
assert.match(i18n, /SUPPORTED_LOCALES = \['zh-CN', 'en', 'es'\]/)
|
|
|
|
|
assert.doesNotMatch(profile, /setLocale|LOCALE_OPTIONS|profile\.language/)
|
|
|
|
|
for (const label of ['简体中文', 'English', 'Español']) assert.match(i18n, new RegExp(label))
|
|
|
|
|
assert.match(profile, /currentLocale, LOCALE_OPTIONS, setLocale/)
|
|
|
|
|
assert.match(profile, /@tap="selectLanguage"[\s\S]*切换语言/)
|
|
|
|
|
assert.match(profile, /uni\.showActionSheet[\s\S]*setLocale\(selected\.value\)/)
|
|
|
|
|
assert.match(inbound, /warehouse-profile/)
|
|
|
|
|
})
|
|
|
|
|