fix: coalesce PDA warehouse profile requests
This commit is contained in:
@@ -147,6 +147,8 @@ 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 = await read('../src/pages/home/home.vue')
|
||||
const [home, inbound] = await Promise.all([read('../src/pages/home/home.vue'), read('../src/api/inbound.js')])
|
||||
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 \}\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user