Commit 3287f8d411
Verified · cmc
Layout: unified · split
gitbayUITests/LiveSmokeUITests.swift +7 −5
| @@ -1949,12 +1949,14 @@ extension LiveSmokeUITests { | ||
| 1949 | 1949 | |
| 1950 | 1950 | // Kept on success too: this is how the preview's look is checked |
| 1951 | 1951 | // 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) | |
| 1957 | 1958 | } |
| 1959 | XCTAssertTrue(scrollTo(rendered), "rendered preview scrolled away") | |
| 1958 | 1960 | let shot = XCTAttachment(screenshot: app.screenshot()) |
| 1959 | 1961 | shot.name = "markup preview" |
| 1960 | 1962 | shot.lifetime = .keepAlways |