Commit a0391a91d6
Verified · cmc
gitbayUITests/LiveSmokeUITests.swift +13 −1
| @@ -731,7 +731,19 @@ extension LiveSmokeUITests { | ||
| 731 | 731 | .waitForExistence(timeout: 20), "sign-in did not land") |
| 732 | 732 | } |
| 733 | 733 | |
| 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 | ||
| 735 | 747 | let attachment = XCTAttachment(screenshot: app.screenshot()) |
| 736 | 748 | attachment.name = name |
| 737 | 749 | attachment.lifetime = .keepAlways |