20260904232445
This commit is contained in:
1 parent
4e167df0f0
commit
1b01a31252
19 files changed
+1099
-1013
No files matched your search
@@ -57,7 +57,7 @@ describe('路由守卫 权限加载(三场景)', () => {
|
||||
expect(usePermissionStore().modules.length).toBe(1)
|
||||
// 再次进入另一受保护页(同主体)不应重复发请求
|
||||
loadDataApi.mockClear()
|
||||
await router.push('/test/list')
|
||||
await router.push('/demo')
|
||||
expect(loadDataApi).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('路由守卫 权限加载(三场景)', () => {
|
||||
// 切换到另一账号
|
||||
auth.setSession({ token: 't2', user: { id: 999, account: 'u2', name: 'U2' } }, 'ORG2')
|
||||
loadDataApi.mockClear()
|
||||
await router.push('/test/list')
|
||||
await router.push('/demo')
|
||||
expect(loadDataApi).toHaveBeenCalled() // 新主体重新加载
|
||||
expect(usePermissionStore().modules.length).toBe(1)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user