From b5250591eab2af86a5767d0efc6ad03418c87dce Mon Sep 17 00:00:00 2001 From: Gronod Date: Sat, 12 Sep 2026 13:02:24 +0100 Subject: [PATCH] test(m9): scroll stage-2 explicitly before per-page print click (#132) btnPrintPage-0 sits at the window's bottom edge on the 1280x800 runner; XCUI's automatic scroll-to-visible runs but never moves the frame (run 32209). Scroll the stage-2 ScrollView manually until hittable. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- Tests/ICCeryUITests/Milestone3UITests.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Tests/ICCeryUITests/Milestone3UITests.swift b/Tests/ICCeryUITests/Milestone3UITests.swift index ad4a294..cf70a92 100644 --- a/Tests/ICCeryUITests/Milestone3UITests.swift +++ b/Tests/ICCeryUITests/Milestone3UITests.swift @@ -198,7 +198,18 @@ final class Milestone3UITests: XCTestCase { } XCTAssertTrue(app.buttons["btnPrintAll"].isEnabled) - app.buttons["btnPrintPage-0"].click() + // The gallery cell's Print button can sit at the window's bottom + // edge where XCUI's automatic scroll-to-visible is inert (#132) + // — scroll stage-2 explicitly until the hit point is onscreen. + let printPage = app.buttons["btnPrintPage-0"] + let stage2 = app.scrollViews["stage-2"] + let scrollDeadline = Date().addingTimeInterval(10) + while Date() < scrollDeadline, !printPage.isHittable { + stage2.scroll(byDeltaX: 0, deltaY: -1) + RunLoop.current.run(until: Date().addingTimeInterval(0.2)) + } + XCTAssertTrue(printPage.isHittable) + printPage.click() let argv = waitForLpLine() XCTAssertTrue(argv.contains("AP_ColorMatchingMode"), argv) XCTAssertTrue(argv.contains("page1.tif"), argv) -- 2.39.5