mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Comprehensive rename of all openclaw references to hanzo-bot equivalents: - Package: openclaw → @hanzo/bot - Binary: openclaw → hanzo-bot - Types: OpenClaw* → Bot* - Env vars: OPENCLAW_* → BOT_* - Android: ai.openclaw.android → ai.hanzo.bot.android - iOS/macOS: ai.openclaw.* → ai.hanzo.* - Swift modules: OpenClaw* → Bot* - Plugins: openclaw.plugin.json → bot.plugin.json - Paths: .openclaw/ → .hanzo/bot/ - URLs: github.com/openclaw → github.com/hanzoai
45 lines
1.4 KiB
Swift
45 lines
1.4 KiB
Swift
import HanzoBotProtocol
|
|
import SwiftUI
|
|
import Testing
|
|
@testable import HanzoBot
|
|
|
|
private typealias ProtoAnyCodable = HanzoBotProtocol.AnyCodable
|
|
|
|
@Suite(.serialized)
|
|
@MainActor
|
|
struct OnboardingWizardStepViewTests {
|
|
@Test func noteStepBuilds() {
|
|
let step = WizardStep(
|
|
id: "step-1",
|
|
type: ProtoAnyCodable("note"),
|
|
title: "Welcome",
|
|
message: "Hello",
|
|
options: nil,
|
|
initialvalue: nil,
|
|
placeholder: nil,
|
|
sensitive: nil,
|
|
executor: nil)
|
|
let view = OnboardingWizardStepView(step: step, isSubmitting: false, onSubmit: { _ in })
|
|
_ = view.body
|
|
}
|
|
|
|
@Test func selectStepBuilds() {
|
|
let options: [[String: ProtoAnyCodable]] = [
|
|
["value": ProtoAnyCodable("local"), "label": ProtoAnyCodable("Local"), "hint": ProtoAnyCodable("This Mac")],
|
|
["value": ProtoAnyCodable("remote"), "label": ProtoAnyCodable("Remote")],
|
|
]
|
|
let step = WizardStep(
|
|
id: "step-2",
|
|
type: ProtoAnyCodable("select"),
|
|
title: "Mode",
|
|
message: "Choose a mode",
|
|
options: options,
|
|
initialvalue: ProtoAnyCodable("local"),
|
|
placeholder: nil,
|
|
sensitive: nil,
|
|
executor: nil)
|
|
let view = OnboardingWizardStepView(step: step, isSubmitting: false, onSubmit: { _ in })
|
|
_ = view.body
|
|
}
|
|
}
|