feat(semi-auto): 虎牙客户页登录→资料→绑定流程与返回上一步重置
This commit is contained in:
@@ -44,20 +44,26 @@ describe('待确认角色 UID 取数(huyaUid)', () => {
|
||||
})
|
||||
|
||||
it('虎牙加密串角色 ID 改用 huyaUid 参与比对', () => {
|
||||
const result = compareBindingRole(task('1199608910400', '大鲨鱼伊塞53', '1199608910400'), {
|
||||
bindGameRole: '大鲨鱼伊塞53',
|
||||
bindGameRoleId: '834ee3e75a1bfc9f65fb6b966bac7ef318e68ea',
|
||||
})
|
||||
const result = compareBindingRole(
|
||||
task('1199608910400', '大鲨鱼伊塞53', '1199608910400', '安卓V区'),
|
||||
{
|
||||
bindGameRole: '大鲨鱼伊塞53',
|
||||
bindGameRoleId: '834ee3e75a1bfc9f65fb6b966bac7ef318e68ea',
|
||||
bindGameChannel: '安卓(android) · 微信',
|
||||
},
|
||||
)
|
||||
assert.equal(result.verdict, 'match')
|
||||
assert.equal(result.boundRoleId, '1199608910400')
|
||||
})
|
||||
|
||||
it('没有 huyaUid 时保留原始加密串,仍判不一致', () => {
|
||||
const result = compareBindingRole(task('1199608910400', '大鲨鱼伊塞53'), {
|
||||
it('没有 huyaUid 时无法核对加密角色 ID,判 unknown', () => {
|
||||
const result = compareBindingRole(task('1199608910400', '大鲨鱼伊塞53', '', '安卓V区'), {
|
||||
bindGameRole: '大鲨鱼伊塞53',
|
||||
bindGameRoleId: '834ee3e75a1bfc9f65fb6b966bac7ef318e68ea',
|
||||
bindGameChannel: '安卓(android) · 微信',
|
||||
})
|
||||
assert.equal(result.verdict, 'mismatch')
|
||||
assert.equal(result.verdict, 'unknown')
|
||||
assert.match(result.message, /平台可核对角色ID/)
|
||||
assert.equal(result.boundRoleId, '834ee3e75a1bfc9f65fb6b966bac7ef318e68ea')
|
||||
})
|
||||
})
|
||||
@@ -157,7 +163,7 @@ describe('客户填写角色与平台识别角色比对', () => {
|
||||
assert.equal(result.boundZone, '安卓V区')
|
||||
})
|
||||
|
||||
it('渠道解析不出区服时跳过区服比对', () => {
|
||||
it('渠道解析不出区服时判 unknown,不允许提交', () => {
|
||||
const result = compareBindingRole(
|
||||
task('1199608910400', '大鲨鱼伊塞53', '1199608910400', '苹果Q区'),
|
||||
{
|
||||
@@ -166,41 +172,51 @@ describe('客户填写角色与平台识别角色比对', () => {
|
||||
bindGameChannel: '微信用户',
|
||||
},
|
||||
)
|
||||
assert.equal(result.verdict, 'match')
|
||||
assert.equal(result.verdict, 'unknown')
|
||||
assert.match(result.message, /平台区服/)
|
||||
assert.equal(result.boundZone, '')
|
||||
})
|
||||
|
||||
it('两侧角色 ID 一致时允许确认', () => {
|
||||
const result = compareBindingRole(task('1192083858', '巫师基尔斯84'), {
|
||||
it('客户区服未填时判 unknown,不允许提交', () => {
|
||||
const result = compareBindingRole(task('1199608910400', '大鲨鱼伊塞53', '1199608910400', ''), {
|
||||
bindGameRole: '大鲨鱼伊塞53',
|
||||
bindGameRoleId: '1199608910400',
|
||||
bindGameChannel: '安卓(android) · 微信',
|
||||
})
|
||||
assert.equal(result.verdict, 'unknown')
|
||||
assert.match(result.message, /客户区服/)
|
||||
})
|
||||
|
||||
it('三项一致时允许提交平台绑定', () => {
|
||||
const result = compareBindingRole(task('1192083858', '巫师基尔斯84', '1192083858', '安卓Q区'), {
|
||||
bindGameRole: '巫师基尔斯84',
|
||||
bindGameRoleId: '1192083858',
|
||||
bindGameChannel: '安卓(android) · QQ',
|
||||
})
|
||||
assert.equal(result.verdict, 'match')
|
||||
assert.equal(result.customerRoleId, '1192083858')
|
||||
assert.equal(result.boundRoleId, '1192083858')
|
||||
assert.match(result.message, /可提交平台绑定/)
|
||||
})
|
||||
|
||||
it('两侧角色 ID 不一致时禁止确认', () => {
|
||||
const result = compareBindingRole(task('1192083858', '巫师基尔斯84'), {
|
||||
it('两侧角色 ID 不一致时禁止提交', () => {
|
||||
const result = compareBindingRole(task('1192083858', '巫师基尔斯84', '', '安卓V区'), {
|
||||
bindGameRole: '我是火星人2222',
|
||||
bindGameRoleId: '166909256',
|
||||
bindGameChannel: '安卓(android) · 微信',
|
||||
})
|
||||
assert.equal(result.verdict, 'mismatch')
|
||||
assert.match(result.message, /不一致/)
|
||||
})
|
||||
|
||||
it('缺少角色 ID 时退回角色名称比对', () => {
|
||||
const matched = compareBindingRole(task('', '巫师基尔斯84'), {
|
||||
it('任一侧缺少角色 ID 时判 unknown,不退化为只比角色名', () => {
|
||||
const result = compareBindingRole(task('', '巫师基尔斯84'), {
|
||||
bindGameRole: '巫师基尔斯84',
|
||||
bindGameRoleId: '',
|
||||
})
|
||||
assert.equal(matched.verdict, 'match')
|
||||
|
||||
const mismatched = compareBindingRole(task('', '巫师基尔斯84'), {
|
||||
bindGameRole: '我是火星人2222',
|
||||
bindGameRoleId: '',
|
||||
})
|
||||
assert.equal(mismatched.verdict, 'mismatch')
|
||||
assert.equal(result.verdict, 'unknown')
|
||||
assert.match(result.message, /客户游戏编号/)
|
||||
assert.match(result.message, /平台可核对角色ID/)
|
||||
})
|
||||
|
||||
it('两侧都没有可核对信息时标记为 unknown', () => {
|
||||
|
||||
Reference in New Issue
Block a user