This commit is contained in:
2026-08-27 13:50:44 +08:00
parent 35d0595d85
commit c704032d66
12 changed files with 128 additions and 84 deletions
+3 -2
View File
@@ -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/)