优化
This commit is contained in:
@@ -48,9 +48,10 @@ test('manual logout revokes the refresh token without delaying local cleanup', a
|
||||
assert.match(profile, /logoutRequest\(refreshToken, accessToken\)\.catch/)
|
||||
})
|
||||
|
||||
test('development login remembers only the account preference, never the entered password', async () => {
|
||||
test('production login starts empty and remembers only the account preference', async () => {
|
||||
const [login, session] = await Promise.all([read('../pages/login/login.vue'), read('../stores/session.js')])
|
||||
assert.match(login, /form: \{ userId: 'platform_admin', password: 'ChangeMe123!' \}/)
|
||||
assert.match(login, /form: \{ userId: '', password: '' \}/)
|
||||
assert.doesNotMatch(login, /platform_admin|ChangeMe123!/)
|
||||
assert.match(session, /export function saveLoginPreference\(rememberAccount, account = ''\)/)
|
||||
const savePreference = session.match(/export function saveLoginPreference[\s\S]*?\n\}/)?.[0] || ''
|
||||
assert.match(savePreference, /account: rememberAccount/)
|
||||
|
||||
Reference in New Issue
Block a user