fix(cpa): clarify multithread callback warning
This commit is contained in:
@@ -449,7 +449,7 @@ function getStep10BrowserSwitchRequiredMessage(diagnostics = {}) {
|
||||
const callbackFailureText = normalizeStep9StatusText(diagnostics?.callbackFailureText || '');
|
||||
return [
|
||||
'检测到 CPA 页面同时显示“认证成功”和“回调 URL 提交失败: 请更新CLI Proxy API或检查连接”。',
|
||||
'这类冲突状态通常通过更换浏览器可以解决,请更换浏览器后重新进行注册登录。',
|
||||
'这通常不是浏览器问题,而是 CPA 项目会清理多线程 OAuth 会话。CPA 项目无法使用多线程,请修改 CPA 服务器或改为单线程注册。',
|
||||
callbackFailureText ? `面板原文:${callbackFailureText}` : '',
|
||||
].filter(Boolean).join(' ');
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ test('step 10 explains callback upgrade hint with user-friendly reason', () => {
|
||||
assert.match(explanation.userMessage, /回调提交阶段/);
|
||||
});
|
||||
|
||||
test('step 10 requests browser switch when success badge and callback upgrade failure coexist', () => {
|
||||
test('step 10 warns about CPA multithread cleanup when success and callback failure coexist', () => {
|
||||
const api = createApi();
|
||||
const diagnostics = api.buildStep9StatusDiagnostics(
|
||||
[
|
||||
@@ -231,5 +231,6 @@ test('step 10 requests browser switch when success badge and callback upgrade fa
|
||||
);
|
||||
|
||||
assert.equal(api.isStep10BrowserSwitchRequiredConflict(diagnostics), true);
|
||||
assert.match(api.getStep10BrowserSwitchRequiredMessage(diagnostics), /更换浏览器后重新进行注册登录/);
|
||||
assert.match(api.getStep10BrowserSwitchRequiredMessage(diagnostics), /CPA 项目无法使用多线程/);
|
||||
assert.match(api.getStep10BrowserSwitchRequiredMessage(diagnostics), /单线程注册/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user