Commit c93e0d11e9
Unsigned
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 |