mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Complete rename of all OpenClaw/OPENCLAW/openclaw references to Hanzo Bot/BOT/bot naming convention: - Env vars: OPENCLAW_* → BOT_* (18 patterns) - Config: ~/.openclaw/ → ~/.bot/, openclaw.json → bot.json - Packages: @openclaw/* → @hanzo/bot-* - Domains: openclaw.ai → hanzo.bot - Mobile: OpenClawKit → BotKit, bundle IDs ai.openclaw → ai.hanzo.bot - mDNS: _openclaw-gw._tcp → _bot-gw._tcp - Docker: CMD hanzo-bot.mjs, BOT_PREFER_PNPM, BOT_DOCKER_APT_PACKAGES - CI: docker-release.yml adds :latest tag on main branch
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
|
|
}
|
|
}
|