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