优化
This commit is contained in:
@@ -8,7 +8,16 @@ test('loads real dashboard data allowed by the current permissions', () => {
|
||||
assert.match(source, /auth\.hasPermission\('company:profile:view'\).*tenant\.loadCompanyContext\(\)/)
|
||||
assert.match(source, /auth\.hasPermission\('company:member:list'\).*tenant\.loadMembers\(\)/)
|
||||
assert.match(source, /auth\.hasPermission\('order:first-leg:list'\).*orders\.load\(\)/)
|
||||
assert.match(source, /onMounted\(\(\) => void loadDashboardData\(\)\)/)
|
||||
assert.match(source, /onMounted\(async \(\) => \{\s*await loadDashboardData\(\)\s*showQualificationReminderOnce\(\)\s*\}\)/)
|
||||
})
|
||||
|
||||
test('prompts once per session for incomplete company qualification and opens the upload dialog', () => {
|
||||
assert.match(source, /\['PROFILE_REQUIRED', 'REJECTED'\]\.includes\(tenant\.company\.auditStatus\)/)
|
||||
assert.match(source, /sessionStorage\.getItem\(reminderKey\)/)
|
||||
assert.match(source, /sessionStorage\.setItem\(reminderKey, 'shown'\)/)
|
||||
assert.match(source, /title="完善企业认证资料"/)
|
||||
assert.match(source, /立即上传认证资料/)
|
||||
assert.match(source, /router\.push\(\{ path: '\/company\/profile', query: \{ qualification: 'upload' \} \}\)/)
|
||||
})
|
||||
|
||||
test('isolates recoverable dashboard failures without hiding successful sections', () => {
|
||||
|
||||
Reference in New Issue
Block a user