fix(douyu): 保留账号并刷新过期二维码

This commit is contained in:
yml
2026-11-20 23:37:13 +08:00
parent e7bea33521
commit a0c250a7fe
3 changed files with 39 additions and 34 deletions
@@ -15,12 +15,12 @@ const backendRoute = readFileSync(
'utf8',
)
test('斗鱼准备阶段只刷新状态,不自动重复开始绑定', () => {
test('斗鱼准备阶段允许客户手动刷新二维码,但不自动重复开始绑定', () => {
assert.ok(!page.includes('autoStartRef'))
assert.ok(!page.includes('void startDouyuBinding(orderNo)'))
assert.ok(page.includes('async function refreshStatus()'))
assert.ok(page.includes('onClick={() => void refreshStatus()}'))
assert.ok(page.includes('刷新状态'))
const preparingCard = page.slice(page.indexOf('customer-douyu-preparing-button'))
assert.ok(preparingCard.includes('onClick={() => void startBinding(true)}'))
assert.ok(preparingCard.includes('刷新二维码'))
})
test('刷新二维码前先同步权威状态,有效二维码直接复用', () => {
@@ -32,10 +32,10 @@ test('刷新二维码前先同步权威状态,有效二维码直接复用', ()
assert.ok(body.includes('二维码仍在有效期内,已复用当前二维码'))
})
test('客户刷新状态走独立接口,不复用绑定启动接口', () => {
assert.ok(frontendService.includes('/binding/refresh'))
assert.ok(backendRoute.includes("'/:orderNo/binding/refresh'"))
assert.ok(backendRoute.includes('refreshDouyuCustomerBinding'))
test('客户手动刷新二维码走幂等绑定启动接口', () => {
assert.ok(frontendService.includes('/binding/start'))
assert.ok(backendRoute.includes("'/:orderNo/binding/start'"))
assert.ok(backendRoute.includes('startDouyuCustomerBinding'))
})
test('斗鱼领取页顶部保留 KV,不再展示领取标题', () => {