Files
openclaw/apps/ios/Tests/GatewayQuickSetupSheetMoodTests.swift
Peter Steinberger 6b79db8b7d feat(ios): mascot moods for onboarding and gateway quick setup (#108900)
* feat(ios): mascot moods for onboarding and gateway quick setup

The activation glyph now takes a mood: the onboarding welcome step
shows the hard-hat working mascot while connecting, the success step
celebrates, and the gateway quick-setup header derives working/sad/
curious/idle from its connect state.

* fix(ios): quick-setup mood reflects app-level gateway problems too

The sheet renders two error surfaces — the local connect error and the
app-level gateway problem banner — and the mascot now goes sad for
either instead of only the sheet-local failure.
2026-07-16 08:56:18 -07:00

42 lines
1.1 KiB
Swift

import OpenClawChatUI
import Testing
@testable import OpenClaw
@MainActor
struct GatewayQuickSetupSheetMoodTests {
@Test func `connecting works`() {
#expect(GatewayQuickSetupSheet.headerMood(
connecting: true,
hasError: false,
hasCandidate: false) == .working)
}
@Test func `error is sad`() {
#expect(GatewayQuickSetupSheet.headerMood(
connecting: false,
hasError: true,
hasCandidate: true) == .sad)
}
@Test func `candidate is curious`() {
#expect(GatewayQuickSetupSheet.headerMood(
connecting: false,
hasError: false,
hasCandidate: true) == .curious)
}
@Test func `empty state idles`() {
#expect(GatewayQuickSetupSheet.headerMood(
connecting: false,
hasError: false,
hasCandidate: false) == .idle)
}
@Test func `connecting beats error`() {
#expect(GatewayQuickSetupSheet.headerMood(
connecting: true,
hasError: true,
hasCandidate: true) == .working)
}
}