From 4af2d96294c79dd4284528d7e2576e569a682962 Mon Sep 17 00:00:00 2001 From: gronod Date: Mon, 14 Sep 2026 16:32:57 +0000 Subject: [PATCH] test(m2): mock CUPS so Print All enables on GitHub macos-14 testPrinttargFixtureGalleryAndStubbedPrint asserted btnPrintAll immediately after the gallery appeared, without ICCERY_CUPS_BIN_DIR. Gitea Monterey has system queues; GitHub macos-14-arm64 does not, so selectedPrinter stays empty and the button stays disabled (run 34867767434). Point M2 at Fixtures/bin like M3, and wait for enable. --- Tests/ICCeryUITests/Milestone2UITests.swift | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Tests/ICCeryUITests/Milestone2UITests.swift b/Tests/ICCeryUITests/Milestone2UITests.swift index 0e45344..3a46126 100644 --- a/Tests/ICCeryUITests/Milestone2UITests.swift +++ b/Tests/ICCeryUITests/Milestone2UITests.swift @@ -36,6 +36,7 @@ final class Milestone2UITests: XCTestCase { "ICCERY_UI_TESTING": "1", "ICCERY_TEST_ROOT": testRoot.path, "ICCERY_ARGYLL_BINARY_DIR": binDir.path, + "ICCERY_CUPS_BIN_DIR": binDir.path, "ICCERY_TEST_SAVE_TARGET": workDir.appendingPathComponent("mytarget.ti1").path, "ICCERY_TEST_WORKDIR": workDir.path, @@ -218,11 +219,12 @@ final class Milestone2UITests: XCTestCase { XCTAssertTrue(FileManager.default.fileExists( atPath: workDir.appendingPathComponent("mytarget.ti2").path)) - // Print panel is live from M3; a default printer is selected - // so both the all-pages and per-page print buttons are enabled. + // Print panel is live from M3. GitHub macos-14 has no system + // queues, so mock CUPS (`ICCERY_CUPS_BIN_DIR`) must enumerate + // before Print All / per-page enable (run 34867767434). XCTAssertTrue(element("rawPrintPanel").exists) - XCTAssertTrue(app.buttons["btnPrintAll"].isEnabled) - XCTAssertTrue(app.buttons["btnPrintPage-0"].isEnabled) + _ = waitUntilEnabled("btnPrintAll", timeout: 15) + _ = waitUntilEnabled("btnPrintPage-0", timeout: 15) XCTAssertTrue(app.buttons["btnAdvanceToStage3"].isEnabled) } -- 2.39.5