2025-12-14 04:30:45 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
import Testing
|
2026-01-30 03:15:10 +01:00
|
|
|
@testable import OpenClaw
|
2025-12-14 04:30:45 +00:00
|
|
|
|
|
|
|
|
@Suite(.serialized)
|
|
|
|
|
@MainActor
|
|
|
|
|
struct MenuContentSmokeTests {
|
|
|
|
|
@Test func menuContentBuildsBodyLocalMode() {
|
|
|
|
|
let state = AppState(preview: true)
|
|
|
|
|
state.connectionMode = .local
|
|
|
|
|
let view = MenuContent(state: state, updater: nil)
|
|
|
|
|
_ = view.body
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test func menuContentBuildsBodyRemoteMode() {
|
|
|
|
|
let state = AppState(preview: true)
|
|
|
|
|
state.connectionMode = .remote
|
|
|
|
|
let view = MenuContent(state: state, updater: nil)
|
|
|
|
|
_ = view.body
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-20 02:20:48 +01:00
|
|
|
@Test func menuContentBuildsBodyUnconfiguredMode() {
|
|
|
|
|
let state = AppState(preview: true)
|
|
|
|
|
state.connectionMode = .unconfigured
|
|
|
|
|
let view = MenuContent(state: state, updater: nil)
|
|
|
|
|
_ = view.body
|
|
|
|
|
}
|
2025-12-24 17:42:24 +01:00
|
|
|
|
|
|
|
|
@Test func menuContentBuildsBodyWithDebugAndCanvas() {
|
|
|
|
|
let state = AppState(preview: true)
|
|
|
|
|
state.connectionMode = .local
|
|
|
|
|
state.debugPaneEnabled = true
|
|
|
|
|
state.canvasEnabled = true
|
|
|
|
|
state.canvasPanelVisible = true
|
|
|
|
|
state.swabbleEnabled = true
|
|
|
|
|
state.voicePushToTalkEnabled = true
|
|
|
|
|
state.heartbeatsEnabled = true
|
|
|
|
|
let view = MenuContent(state: state, updater: nil)
|
|
|
|
|
_ = view.body
|
|
|
|
|
}
|
2025-12-20 02:20:48 +01:00
|
|
|
}
|