Skip to content

Commit b93c2eb

Browse files
committed
test(ios-smoke): limit deep-link prompt retry to target discovery
1 parent cb7f1a6 commit b93c2eb

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎test/integration/ios-simulator-e2e-deep-link-confirmation.test.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ const READINESS_TIMEOUT = result(1, {
3838
},
3939
},
4040
});
41+
const RUNNER_START_TIMEOUT = result(1, {
42+
error: {
43+
code: 'COMMAND_FAILED',
44+
details: {
45+
reason: WAIT_REASONS.readinessExhausted,
46+
readinessPhase: 'runner-start',
47+
readableCaptures: 0,
48+
},
49+
},
50+
});
4151
const OPEN_PROMPT = result(0, {
4252
data: { message: 'Open in “Agent Device Tester”?', items: ['Cancel', 'Open'] },
4353
});
@@ -102,6 +112,14 @@ test('target discovery exhaustion still answers a deep-link confirmation', async
102112
]);
103113
});
104114

115+
test('runner startup exhaustion returns without probing for a deep-link confirmation', async () => {
116+
const { device, log } = simulator([RUNNER_START_TIMEOUT]);
117+
118+
await answerDeepLinkConfirmation(device);
119+
120+
assert.deepEqual(log, ['wait for the deep-link destination (1/5)']);
121+
});
122+
105123
test('a readable no-match that answers Open waits for the released launch', async () => {
106124
const { device, log } = simulator([WRONG_ROUTE, LAUNCH_PENDING, LANDED]);
107125

‎test/integration/ios-simulator-e2e/live-deep-link-confirmation.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export async function answerDeepLinkConfirmation(
7373
reason === WAIT_REASONS.targetAbsent || reason === WAIT_REASONS.deadlineExceeded;
7474
const interruptedObservation =
7575
reason === WAIT_REASONS.captureStalled ||
76-
reason === WAIT_REASONS.readinessExhausted ||
76+
(reason === WAIT_REASONS.readinessExhausted &&
77+
details?.readinessPhase === 'target-discovery') ||
7778
reason === WAIT_REASONS.runnerRestartExhausted;
7879
if (!launchPending && !readableMiss && !interruptedObservation) return;
7980
if (!answered) answered = await acceptOpenConfirmation(device);

0 commit comments

Comments
 (0)