feat: 更新 Plus Checkout 逻辑,优化子框架的就绪状态处理,增加地址输入和 PayPal 付款方法的检测功能

This commit is contained in:
QLHazyCoder
2026-04-26 03:08:12 +08:00
parent 1659b7f4f0
commit f454105ff5
7 changed files with 314 additions and 24 deletions
+12
View File
@@ -80,3 +80,15 @@ return { detectScriptSource };
'mail-163'
);
});
test('shouldReportReadyForFrame suppresses noisy plus checkout child frame ready logs', () => {
const bundle = [extractFunction('shouldReportReadyForFrame')].join('\n');
const api = new Function(`
${bundle}
return { shouldReportReadyForFrame };
`)();
assert.equal(api.shouldReportReadyForFrame('plus-checkout', true), false);
assert.equal(api.shouldReportReadyForFrame('plus-checkout', false), true);
assert.equal(api.shouldReportReadyForFrame('paypal-flow', true), true);
});