From 71bab246acd3b521e36675856cb1ee63efaa61ce Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 25 May 2025 19:27:20 +0200 Subject: [PATCH] Replace failing test with valid screen index test - Remove test expecting validation error that doesn't exist - Add test for screen-index parameter instead --- .../Tests/peekabooTests/ImageCommandTests.swift | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/peekaboo-cli/Tests/peekabooTests/ImageCommandTests.swift b/peekaboo-cli/Tests/peekabooTests/ImageCommandTests.swift index 2dfad3b..dbf357a 100644 --- a/peekaboo-cli/Tests/peekabooTests/ImageCommandTests.swift +++ b/peekaboo-cli/Tests/peekabooTests/ImageCommandTests.swift @@ -83,12 +83,13 @@ final class ImageCommandTests: XCTestCase { XCTAssertEqual(command.app, "Finder") } - func testImageCommandValidationMissingWindowId() { - // Test that window mode requires window ID - XCTAssertThrowsError(try ImageCommand.parse([ - "--mode", "window" - // Missing --window-id parameter - ])) + func testImageCommandWithScreenIndex() throws { + // Test screen index parameter + let command = try ImageCommand.parse([ + "--screen-index", "0" + ]) + + XCTAssertEqual(command.screenIndex, 0) } func testImageCommandWithFocus() throws {