#!/usr/bin/env bash
set -euo pipefail
cd "$CHECKOUT"
ad() { npx --yes agent-device@0.21.45 "$@" --session "$DEVICE_SESSION"; }
# Start with the main PR search already set to author:StiensWout fix.
ad keyboard enter
ad wait absent 'role=activity-indicator' 30000
ad record start "$EVIDENCE/mobile-after-short.mp4" --hide-touches
ad swipe 375 132 100 132 --settle
ad press 'label="Filter by author"' --settle
ad press 'label="Search authors…"' --settle
ad fill 'role=search label="Search authors"' saphid --delay-ms 80 --settle
ad keyboard enter
ad press 'role=cell label="saphid"' --settle
ad wait absent 'role=activity-indicator' 30000
ad fill 'role=search' 'author:saphid fix' --delay-ms 80 --settle
ad keyboard enter
ad press 'label="Filter by author"' --settle
ad press 'label="Search authors…"' --settle
ad press 'role=cell label="saphid"' --settle
ad wait absent 'role=activity-indicator' 30000
ad record stop
