From 38d70933a1698f8e100b0a90b782f09b98710570 Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Thu, 2 Jul 2026 15:08:00 -0700 Subject: [PATCH] e2e: fix the last two iOS-only failures (verified on a real simulator) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Debugged locally on a macOS simulator (the CI loop was too slow): - The flaky 'Settings not visible' on iOS was the first-launch 'would like to send you notifications' permission dialog, which dims the whole screen and blocks every tap. It only appeared on CI's fresh simulators (a used sim has already answered it). Pre-grant the permission with applesimutils before the run so the dialog never shows, and drop clearState from 00-server-setup — clearState reinstalls the app and resets that grant, re-showing the dialog (the app is freshly installed on a fresh device anyway). - 03-go-live: iOS collapses the entire login modal into one accessibility element whose text is a concatenation ('Sign Up, Log In, Log in, ...'), so an exact 'Log [Ii]n' match never hit. Match it as a substring. Full suite now passes 5/5 on a fresh iOS simulator, twice in a row. Co-Authored-By: Claude Fable 5 --- .github/workflows/build.yaml | 8 ++++++++ .maestro/00-server-setup.yaml | 7 +++++-- .maestro/03-go-live.yaml | 7 ++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8c046cd7d..cbfe2030a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -332,6 +332,10 @@ jobs: echo "$HOME/.maestro/bin" >> $GITHUB_PATH brew tap facebook/fb brew install facebook/fb/idb-companion + # applesimutils lets us pre-grant notification permission so the + # first-launch permission dialog never appears + brew tap wix/brew + brew install applesimutils - name: build for simulator run: | @@ -364,6 +368,10 @@ jobs: xcrun simctl boot "$UDID" xcrun simctl bootstatus "$UDID" -b xcrun simctl install "$UDID" js/app/ios/build/Build/Products/Release-iphonesimulator/Streamplace.app + # Pre-grant notifications so the first-launch "would like to send + # you notifications" dialog (which dims the whole screen and blocks + # every subsequent tap) never appears. + applesimutils --byId "$UDID" --bundle tv.aquareum --setPermissions notifications=YES - name: download streamplace binary uses: actions/download-artifact@v4 diff --git a/.maestro/00-server-setup.yaml b/.maestro/00-server-setup.yaml index a74dd8d0b..6344ca67d 100644 --- a/.maestro/00-server-setup.yaml +++ b/.maestro/00-server-setup.yaml @@ -1,7 +1,10 @@ appId: ${APP_ID} --- -- launchApp: - clearState: true +# No clearState: the app is freshly installed on a fresh device in CI, so +# there's nothing to clear, and clearState reinstalls the app — which +# resets the notification permission we pre-granted, re-showing the +# first-launch permission dialog that dims the screen and blocks taps. +- launchApp - takeScreenshot: 00-01-launched # first launch on a cold CI emulator can take a while to render - extendedWaitUntil: diff --git a/.maestro/03-go-live.yaml b/.maestro/03-go-live.yaml index 2ddbb66f5..43ea6b7f0 100644 --- a/.maestro/03-go-live.yaml +++ b/.maestro/03-go-live.yaml @@ -11,8 +11,9 @@ appId: ${APP_ID} - tapOn: text: "Start streaming" - takeScreenshot: 03-02-after-start-streaming -# match the modal's plain-text title ("Log in"); the "Log In" button text -# is inside a Pressable that collapses on iOS and isn't findable +# iOS collapses the whole login modal into one accessibility element whose +# text is a concatenation ("Sign Up, Log In, Log in, ..."), so match the +# login label as a substring rather than the whole element. - assertVisible: - text: "Log [Ii]n" + text: ".*Log [Ii]n.*" - takeScreenshot: 03-03-log-in -- 2.51.2