#!/usr/bin/env bash
set -eu
# Run from the scenario checkout after vp i. The runner's older mobile client
# cannot speak to the pool's current daemon; the checkout already has 0.21.41.
ln -sfn ../../agent-device@0.21.41/node_modules/agent-device node_modules/.pnpm/@e2e-dev+mobile@0.12.6_e2e@0.23.0/node_modules/agent-device
python3 - <<'PY'
from pathlib import Path
p=Path('scripts/e2e.config.ts')
s=p.read_text()
if 'actionTimeout: 120_000' not in s:
 s=s.replace('  assertionTimeout: 15_000,','  assertionTimeout: 15_000,\n  actionTimeout: 120_000,')
p.write_text(s)
PY
T3CODE_DEV_SEED=0 T3_SCENARIO_INHERIT_ENV='GH_TOKEN,GITHUB_TOKEN' vp run scenarios:prove scripts/scenarios/issue-40760-mobile.e2e.ts --base 15a3daa32a745bc56be9d7dbb346d80661e6b7bd --head 8d41e77c1ec2804e2405a37bb8cbbe93a8852f4a --upload-command 'ghdrop upload'
