Commit c93e0d11e9

c93e0d11e9280ca93260395deeb8536d7bae9d2e

parent: 44dcfe14d4

Unsigned

cmc <hello@cleberg.net> · 2026-08-28 21:45 UTC

screenshots: dismiss the save-password sheet before capturing

Signing in types a token into a SecureField, so iOS offers to save it —
and the sheet sits over the dashboard, which is where the screenshot is
taken. Earlier runs missed it only because the simulator was already
signed in. It belongs to springboard and takes longer than five seconds
to appear.

Layout: unified · split

gitbayUITests/LiveSmokeUITests.swift +21
@@ -729,6 +729,27 @@ extension LiveSmokeUITests {
729 focusAndType(tokenField, token + "\n") 729 focusAndType(tokenField, token + "\n")
730 XCTAssertTrue(app.staticTexts["Dashboard"].firstMatch 730 XCTAssertTrue(app.staticTexts["Dashboard"].firstMatch
731 .waitForExistence(timeout: 20), "sign-in did not land") 731 .waitForExistence(timeout: 20), "sign-in did not land")
732 dismissSavePasswordPrompt()
733 }
734
735 /// iOS offers to save whatever went into a SecureField, and the sheet
736 /// sits over the app until answered — over the dashboard, in one set
737 /// of store screenshots. It belongs to springboard, not to the app.
738 private func dismissSavePasswordPrompt() {
739 let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
740 let notNow = springboard.buttons["Not Now"].firstMatch
741 if notNow.waitForExistence(timeout: 8) {
742 notNow.tap()
743 _ = waitForDisappearance(notNow, timeout: 10)
744 return
745 }
746 let inApp = app.buttons["Not Now"].firstMatch
747 if inApp.waitForExistence(timeout: 3) {
748 inApp.tap()
749 _ = waitForDisappearance(inApp, timeout: 10)
750 return
751 }
752 // No prompt is fine: iOS only offers once per credential.
732 } 753 }
733 754
734 /// Capture a screen, but not while it is still loading. These go to 755 /// Capture a screen, but not while it is still loading. These go to