fix: avoid repeated PDA bootstrap validation
This commit is contained in:
@@ -79,7 +79,7 @@ test('login has no committed demo credentials and inbound operation implements t
|
||||
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 loadCandidates\(feedback = true, refreshWarehouse = 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\)/)
|
||||
assert.match(overseas, /replaceTokens|refreshOverseasToken/)
|
||||
@@ -147,8 +147,10 @@ test('Chinese English and Spanish locale selection is persisted from profile wit
|
||||
})
|
||||
|
||||
test('home reuses the persisted warehouse profile instead of requesting it on every show', async () => {
|
||||
const [home, inbound] = await Promise.all([read('../src/pages/home/home.vue'), read('../src/api/inbound.js')])
|
||||
const [home, inbound, operation] = await Promise.all([read('../src/pages/home/home.vue'), read('../src/api/inbound.js'), read('../src/pages/operation/operation.vue')])
|
||||
assert.match(home, /if \(!this\.user\?\.warehouseCode \|\| !this\.user\?\.warehouseName\) this\.loadWarehouseProfile\(\)/)
|
||||
assert.match(inbound, /let warehouseProfileRequest = null/)
|
||||
assert.match(inbound, /if \(!warehouseProfileRequest\)[\s\S]*\.finally\(\(\) => \{ warehouseProfileRequest = null \}\)/)
|
||||
assert.match(operation, /await this\.refreshBoundWarehouse\(\)[\s\S]*await this\.loadCandidates\(false, false\)/)
|
||||
assert.match(operation, /if \(refreshWarehouse\) await this\.refreshBoundWarehouse\(\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user