Skip to main content
Glama
ClickCommandTests.swift1.1 kB
import Foundation import Testing @testable import PeekabooCLI @Suite( "ClickCommand Tests", .tags(.automation), .enabled(if: CLITestEnvironment.runAutomationRead) ) struct ClickCommandTests { @Test("Click command requires argument or option") func requiresArgumentOrOption() async throws { #expect(throws: (any Error).self) { try CLIOutputCapture.suppressStderr { _ = try ClickCommand.parse([]) } } } @Test("Click command parses coordinates correctly") func parsesCoordinates() async throws { var command = try ClickCommand.parse(["--coords", "100,200", "--json-output"]) // Should execute without throwing when coordinates are provided try await command.run() } @Test("Click command validates coordinate format") func validatesCoordinateFormat() async throws { #expect(throws: (any Error).self) { try CLIOutputCapture.suppressStderr { _ = try ClickCommand.parse(["--coords", "invalid", "--json-output"]) } } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/steipete/Peekaboo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server