固化登录支付未接入回退边界

移动壳测试覆盖登录和支付未接真实渠道时返回 unsupported_method。

桌面壳测试覆盖登录和支付未接真实渠道时返回 unsupported_method。

更新宿主壳方案说明登录支付半接入不得返回伪成功。

更新共享决策日志记录登录支付 unsupported 回退验收口径。
This commit is contained in:
2026-06-18 11:44:39 +08:00
parent 25b140d63e
commit 1817793de2
4 changed files with 21 additions and 7 deletions
+7 -5
View File
@@ -1792,12 +1792,14 @@ mod tests {
#[test]
fn unsupported_method_is_explicit() {
let response = resolve_host_bridge_request(request("payment.request"));
for method in ["auth.requestLogin", "payment.request"] {
let response = resolve_host_bridge_request(request(method));
assert!(!response.ok);
let error = response.error.expect("error");
assert_eq!(error.code, "unsupported_method");
assert!(error.message.contains("payment.request"));
assert!(!response.ok);
let error = response.error.expect("error");
assert_eq!(error.code, "unsupported_method");
assert!(error.message.contains(method));
}
}
#[test]
@@ -415,6 +415,18 @@ describe('handleMobileHostBridgeMessage', () => {
expect(failedResponse.error.code).toBe('unsupported_method');
});
test.each(['auth.requestLogin', 'payment.request'] as const)(
'%s 未接入真实渠道前明确返回 unsupported',
async (method) => {
const response = await send(request(method));
const failedResponse = expectFailed(response);
expect(failedResponse.error.code).toBe('unsupported_method');
expect(failedResponse.error.message).toContain(method);
},
);
test('app.reloadWebView 刷新移动壳当前 WebView', async () => {
const reloadWebView = vi.fn();
configureMobileHostBridgeNavigation({