mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-17 16:12:21 -06:00
6b79db8b7d
* 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.
42 lines
1.1 KiB
Swift
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)
|
|
}
|
|
}
|