优化
This commit is contained in:
+2
-2
@@ -29,8 +29,8 @@ function authRequest(path, data, options = {}) {
|
||||
})
|
||||
}
|
||||
|
||||
export function login(username, password) {
|
||||
return authRequest('/auth/login', { username, password })
|
||||
export function login(loginId, password) {
|
||||
return authRequest('/auth/login', { loginId, password })
|
||||
}
|
||||
|
||||
export function refresh(refreshToken) {
|
||||
|
||||
@@ -29,6 +29,8 @@ test('login uses the real auth endpoint and relaunches to the modular workbench'
|
||||
for (const text of ['柏悦物流 · PDA作业端', '工号 / 用户名', '登录中']) assert.match(login, new RegExp(text))
|
||||
assert.doesNotMatch(login, /DEMO_ACCOUNTS|快捷登录|作业仓库/)
|
||||
assert.match(auth, /\/auth\/login/)
|
||||
assert.match(auth, /authRequest\('\/auth\/login', \{ loginId, password \}\)/)
|
||||
assert.doesNotMatch(auth, /authRequest\('\/auth\/login', \{ username, password \}\)/)
|
||||
assert.match(login, /loginRequest\(userId, this\.form\.password\)/)
|
||||
assert.match(login, /signInWithTokens\(tokens\)/)
|
||||
assert.match(login, /form: \{ userId: '', password: '' \}/)
|
||||
|
||||
Reference in New Issue
Block a user