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 {
1949 1949
1950 // Kept on success too: this is how the preview's look is checked 1950 // Kept on success too: this is how the preview's look is checked
1951 // in light and dark without signing a simulator in by hand. 1951 // in light and dark without signing a simulator in by hand.
1952 // isHittable is true behind the keyboard, which is its own window; 1952 // The rendered text sits under the keyboard, below the comment
1953 // compare frames so the screenshot shows the rendering. 1953 // field. A drag on a list of text fields dismisses the keyboard,
1954 let keyboard = app.keyboards.firstMatch 1954 // which leaves the row on screen for the screenshot.
1955 for _ in 0..<3 where keyboard.exists && rendered.frame.maxY > keyboard.frame.minY { 1955 if app.keyboards.firstMatch.exists {
1956 app.swipeUp() 1956 app.swipeDown()
1957 _ = app.keyboards.firstMatch.waitForNonExistence(timeout: 3)
1957 } 1958 }
1959 XCTAssertTrue(scrollTo(rendered), "rendered preview scrolled away")
1958 let shot = XCTAttachment(screenshot: app.screenshot()) 1960 let shot = XCTAttachment(screenshot: app.screenshot())
1959 shot.name = "markup preview" 1961 shot.name = "markup preview"
1960 shot.lifetime = .keepAlways 1962 shot.lifetime = .keepAlways