desktop boot check: match the submit dry run by its fields, not the exact JSON (the call carries platform since the macOS support; 0.8.14's Mac build stopped on it)

This commit is contained in:
CRTkafa 2026-10-20 03:29:59 +07:00
parent e59539fec8
commit 7c04a0653b

View file

@ -453,7 +453,9 @@ async function runSubmitCase(browser: Browser, sidecar: Sidecar, base: 'd3-full'
await gone(page, '.oa-panel');
if (await page.locator('.oa-panel').count()) problems.push('plan panel does not close with Escape');
const want = variant === 'ready' ? 'owner.apple_submit' : 'owner.apple_resubmit';
if (!live.calls.some(c => c.startsWith(`dry ${want} {"build":"52","version":"2.4.0"}`))) problems.push(`no dry run of ${want} with build 52 and version 2.4.0: ${live.calls.join(' | ')}`);
// match the fields, not the exact JSON: the call may carry more of them (platform since the macOS support)
const dryOf = (c: string): Record<string, unknown> | null => { if (!c.startsWith(`dry ${want} `)) return null; try { return JSON.parse(c.slice(`dry ${want} `.length)); } catch { return null; } };
if (!live.calls.some(c => { const a = dryOf(c); return !!a && a.build === '52' && a.version === '2.4.0'; })) problems.push(`no dry run of ${want} with build 52 and version 2.4.0: ${live.calls.join(' | ')}`);
if (!live.calls.some(c => c.startsWith(`write_with_confirm ${want}`))) problems.push(`${want} did not go through write_with_confirm`);
// Google Play: versionCodes by number (one already in production cannot be picked), then the production plan
const codes = page.locator('[data-section="submit"] select[aria-describedby="sub-code-hint"]');