Skip to content

Commit 44272a9

Browse files
committed
Harden CLI integration fixture launch
1 parent bfea60c commit 44272a9

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

scripts/integration/cli.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,28 @@ async function ensureFixtureForeground(label, options = {}) {
837837
if (launchError === null) {
838838
throw verifyError;
839839
}
840+
logStep(`${label}: opening fixture URL after launch timeout`);
841+
}
842+
843+
try {
844+
await retrySimdeckJson(
845+
cliArgs(["open-url", simulatorUDID, fixtureUrl]),
846+
`${label} fixture URL fallback`,
847+
{
848+
attempts: 2,
849+
delayMs: 2_000,
850+
timeoutMs: 180_000,
851+
},
852+
);
853+
return await verifyUi(label, {
854+
expectFixture: true,
855+
attempts: options.fallbackVerifyAttempts ?? 12,
856+
delayMs: options.fallbackVerifyDelayMs ?? 1_500,
857+
});
858+
} catch (urlError) {
859+
logStep(
860+
`${label}: fixture URL fallback failed: ${summarizeError(urlError)}`,
861+
);
840862
logStep(`${label}: tapping fixture icon after launch timeout`);
841863
}
842864

0 commit comments

Comments
 (0)