a native ios client for gitbay

client ios swift

https://gitbay.org

Commit a0391a91d6

a0391a91d69ac94f05e012a64678c6cf47516323

parent: 1a113f7129

Verified · cmc

cmc <hello@cleberg.net> · 2026-08-28T21:20:12Z

screenshots: never capture a screen that is still loading

snap() fired the moment a screen appeared, so the iPad dashboard shipped
as a bare spinner — dashboard, explore and feed all snapped without
waiting for anything. It now waits out any activity indicator and for the
first row to exist before capturing.
gitbayUITests/LiveSmokeUITests.swift +13 −1
@@ -731,7 +731,19 @@ extension LiveSmokeUITests {
731731 .waitForExistence(timeout: 20), "sign-in did not land")
732732 }
733733
734 private func snap(_ name: String) {
734 /// Capture a screen, but not while it is still loading. These go to
735 /// the App Store, and a spinner shipped as a screenshot once already.
736 private func snap(_ name: String, file: StaticString = #filePath, line: UInt = #line) {
737 let spinner = app.activityIndicators.firstMatch
738 if spinner.exists {
739 XCTAssertTrue(waitForDisappearance(spinner, timeout: 30),
740 "\(name) still loading after 30s", file: file, line: line)
741 }
742 // A list that has loaded has rows; an empty state has text. Either
743 // way something must be on screen besides chrome.
744 let content = app.cells.firstMatch
745 _ = content.waitForExistence(timeout: 10)
746
735747 let attachment = XCTAttachment(screenshot: app.screenshot())
736748 attachment.name = name
737749 attachment.lifetime = .keepAlways