安全:隔离报表选项扫码与首页数据
This commit is contained in:
@@ -1272,6 +1272,14 @@ test('六个只读报表页面逐页满足 API、权限、筛选、列和异步
|
||||
}
|
||||
})
|
||||
|
||||
test('首页指标全部来自受批次作用域保护的业务与报表 API', async () => {
|
||||
const source = await readFile(path.join(frontendRoot, 'src/views/dashboard/index.vue'), 'utf8')
|
||||
for (const api of ['listInbound', 'listReturn', 'listShipment', 'listPalletInventory', 'listShipmentReport']) {
|
||||
assert.match(source, new RegExp(`\\b${api}\\b`))
|
||||
}
|
||||
assert.doesNotMatch(source, /axios\.|fetch\(/)
|
||||
})
|
||||
|
||||
test('扫码组件声明交互契约并保持触控尺寸', async () => {
|
||||
const source = await readFile(path.join(frontendRoot, 'src/components/PalletScanInput/index.vue'), 'utf8')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user