Commit 3287f8d411

3287f8d4114f63ce03d292eed48e5a6ee076d5c4

parent: 81fc22d47b

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-22 22:37 UTC

live suite: dismiss the keyboard before the preview screenshot

Layout: unified · split

gitbayUITests/LiveSmokeUITests.swift +7 −5
@@ -1949,12 +1949,14 @@ extension LiveSmokeUITests {
19491949
19501950 // Kept on success too: this is how the preview's look is checked
19511951 // in light and dark without signing a simulator in by hand.
1952 // isHittable is true behind the keyboard, which is its own window;
1953 // compare frames so the screenshot shows the rendering.
1954 let keyboard = app.keyboards.firstMatch
1955 for _ in 0..<3 where keyboard.exists && rendered.frame.maxY > keyboard.frame.minY {
1956 app.swipeUp()
1952 // The rendered text sits under the keyboard, below the comment
1953 // field. A drag on a list of text fields dismisses the keyboard,
1954 // which leaves the row on screen for the screenshot.
1955 if app.keyboards.firstMatch.exists {
1956 app.swipeDown()
1957 _ = app.keyboards.firstMatch.waitForNonExistence(timeout: 3)
19571958 }
1959 XCTAssertTrue(scrollTo(rendered), "rendered preview scrolled away")
19581960 let shot = XCTAttachment(screenshot: app.screenshot())
19591961 shot.name = "markup preview"
19601962 shot.lifetime = .keepAlways