fix: include latest GPC page log on failures
This commit is contained in:
@@ -1058,7 +1058,7 @@ test('GPC billing restarts when start button returns without subscription done',
|
||||
const { events, executor, pageHarness } = createGpcPageExecutorHarness([
|
||||
{ startButtonText: '开始 Plus 充值', logText: 'SYSTEM 页面已就绪' },
|
||||
{ startButtonText: '任务进行中', logText: '处理中' },
|
||||
{ startButtonText: '开始 Plus 充值', logText: '失败后回到开始' },
|
||||
{ startButtonText: '开始 Plus 充值', logText: 'SYSTEM\n卡密次数不足,任务已停止' },
|
||||
{ startButtonText: '任务进行中', logText: '第二次处理中' },
|
||||
{ startButtonText: '开始 Plus 充值', logText: '订阅完成', hasSubscriptionDone: true },
|
||||
]);
|
||||
@@ -1071,6 +1071,7 @@ test('GPC billing restarts when start button returns without subscription done',
|
||||
|
||||
assert.equal(pageHarness.clicks.length, 2);
|
||||
assert.equal(events.logs.some((entry) => /准备再次启动/.test(entry.message)), true);
|
||||
assert.equal(events.logs.some((entry) => /准备再次启动.*最近日志:卡密次数不足,任务已停止/.test(entry.message)), true);
|
||||
assert.equal(events.completed.length, 1);
|
||||
});
|
||||
|
||||
@@ -1098,7 +1099,7 @@ test('GPC billing collapses repeated running status logs with a multiplier', asy
|
||||
|
||||
test('GPC billing fails current round without restart when account has no trial eligibility', async () => {
|
||||
const { events, executor, pageHarness } = createGpcPageExecutorHarness([
|
||||
{ startButtonText: '开始 Plus 充值', logText: '该账户没有试用资格', noTrial: true },
|
||||
{ startButtonText: '开始 Plus 充值', logText: 'SYSTEM\n该账户没有试用资格', noTrial: true },
|
||||
]);
|
||||
|
||||
await assert.rejects(
|
||||
@@ -1107,7 +1108,7 @@ test('GPC billing fails current round without restart when account has no trial
|
||||
plusCheckoutSource: 'gpc-helper',
|
||||
plusCheckoutTabId: 77,
|
||||
}),
|
||||
/PLUS_CHECKOUT_NON_FREE_TRIAL::.*该账户没有试用资格/
|
||||
/PLUS_CHECKOUT_NON_FREE_TRIAL::.*该账户没有试用资格.*最近日志:该账户没有试用资格/
|
||||
);
|
||||
|
||||
assert.equal(pageHarness.clicks.length, 0);
|
||||
|
||||
Reference in New Issue
Block a user