feat(client): align account and order foundations
This commit is contained in:
@@ -30,9 +30,12 @@ test('groups the full registration contract without adding out-of-scope sign-in
|
||||
assert.doesNotMatch(loginSource + registerSource, /微信登录|企业微信登录|短信验证码|邮箱验证码|lang-switcher/)
|
||||
})
|
||||
|
||||
test('matches the backend username login contract', () => {
|
||||
assert.match(loginSource, /label="用户名"/)
|
||||
assert.match(loginSource, /\^\[A-Za-z0-9_\]/)
|
||||
test('matches the frozen username-or-mobile login contract', () => {
|
||||
assert.match(loginSource, /label="用户名或手机号"/)
|
||||
assert.match(loginSource, /const usernamePattern = \/\^\[A-Za-z\]/)
|
||||
assert.match(loginSource, /const mainlandMobilePattern = \/\^1\[3-9\]\\d\{9\}\$\//)
|
||||
assert.match(authApiSource, /data: \{ loginId, password \}/)
|
||||
assert.doesNotMatch(authApiSource, /data: \{ username, password \}/)
|
||||
assert.match(loginSource, /typeof route\.query\.account === 'string'/)
|
||||
assert.doesNotMatch(loginSource, /developmentHint|demo-tip|merchant_admin|联调账号|本地后端/)
|
||||
assert.match(loginSource, /form\.remember/)
|
||||
@@ -59,9 +62,9 @@ test('shows immediate login after registration and separates company review from
|
||||
assert.match(registerSource, /企业账号注册成功/)
|
||||
assert.match(registerSource, /无需等待注册审核/)
|
||||
assert.match(registerSource, /提交订单前还需完成企业审核/)
|
||||
assert.match(registerSource, /营业执照和法人身份证/)
|
||||
assert.match(registerSource, /货代资质证书、银行开户许可证可选填/)
|
||||
assert.match(registerSource, /其他资质可选填/)
|
||||
assert.match(registerSource, /首次登录需上传营业执照/)
|
||||
assert.match(registerSource, /法人身份证、货代资质证书和银行开户许可证可选填/)
|
||||
assert.match(registerSource, /法人身份证及其他资质可选填/)
|
||||
assert.match(registerSource, /立即登录/)
|
||||
})
|
||||
|
||||
@@ -113,6 +116,11 @@ test('shows the backend credential error on login', () => {
|
||||
assert.doesNotMatch(loginSource, /登录状态已失效,请重新登录/)
|
||||
})
|
||||
|
||||
test('shows a forced re-login notice after login identifiers change', () => {
|
||||
assert.match(loginSource, /route\.query\.reason === 'identifiers-updated'/)
|
||||
assert.match(loginSource, /所有会话均已退出,请重新登录/)
|
||||
})
|
||||
|
||||
test('keeps a valid local session during temporary context and refresh outages', () => {
|
||||
assert.match(authStoreSource, /function isExpiredSessionError/)
|
||||
assert.match(authStoreSource, /if \(isExpiredSessionError\(error\)\)/)
|
||||
|
||||
Reference in New Issue
Block a user