优化
This commit is contained in:
@@ -104,6 +104,12 @@ test('treats only body code 200 as success', () => {
|
|||||||
assert.doesNotMatch(httpSource, /if \(envelope\.code !== '0'\)/)
|
assert.doesNotMatch(httpSource, /if \(envelope\.code !== '0'\)/)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('shows the backend credential error on login', () => {
|
||||||
|
assert.match(httpSource, /new ApiError\(apiErrorMessage\(envelope\.message, fieldErrors\), envelope\.code/)
|
||||||
|
assert.match(loginSource, /ElMessage\.error\(error instanceof Error \? error\.message : '登录失败,请检查账号后重试'\)/)
|
||||||
|
assert.doesNotMatch(loginSource, /登录状态已失效,请重新登录/)
|
||||||
|
})
|
||||||
|
|
||||||
test('keeps a valid local session during temporary context and refresh outages', () => {
|
test('keeps a valid local session during temporary context and refresh outages', () => {
|
||||||
assert.match(authStoreSource, /function isExpiredSessionError/)
|
assert.match(authStoreSource, /function isExpiredSessionError/)
|
||||||
assert.match(authStoreSource, /if \(isExpiredSessionError\(error\)\)/)
|
assert.match(authStoreSource, /if \(isExpiredSessionError\(error\)\)/)
|
||||||
|
|||||||
Reference in New Issue
Block a user