Repository Public
1// Author: Simon-Pierre Boucher — contact@spboucher.ai2// File: Tests/LocalChatMacUITests/MacSmokeTests.swift3// Description: UI smoke tests of the macOS app on a throw-away store: launch, navigation between every section, new chat, composer.4import XCTest56final class MacSmokeTests: XCTestCase {7 @MainActor func testLaunchNavigateAndCompose() throws {8 let app = XCUIApplication()9 app.launchArguments = ["-LCEphemeral"]10 app.launch()11 XCTAssertTrue(app.buttons["section-chat"].waitForExistence(timeout: 20))12 for section in ["models", "arena", "observatory", "knowledge", "agents", "settings", "chat"] {13 app.buttons["section-\(section)"].click()14 XCTAssertTrue(app.buttons["section-\(section)"].exists)15 }16 app.buttons["new-chat"].firstMatch.click()17 let field = app.textFields["composer-field"].firstMatch.exists ? app.textFields["composer-field"].firstMatch : app.textViews["composer-field"].firstMatch18 XCTAssertTrue(field.waitForExistence(timeout: 10))19 field.click(); field.typeText("Hello from the UI test")20 XCTAssertTrue(app.buttons["send-button"].firstMatch.isEnabled)21 }22}23