Files
openclaw/apps/ios/Tests/Logic/WatchMascotTests.swift
Peter Steinberger c6ebd6be34 feat(watch): inbox mascot with Always-On-safe rendering (#109365)
The watch inbox's empty and waiting surface gets a 72pt Clawd: sleepy
(nightcap and all) when nothing is waiting, thinking while the watch
waits for iPhone sync, attentive when an approval needs a decision.
The Always-On display renders a static pose so the animation loop
never runs dimmed, and the active loop is throttled to 15fps for
battery. The shared mascot gains a defaulted minimum frame interval;
mascot sources compile directly into the watch target following the
TalkWaveformView pattern.
2026-07-16 17:47:07 -07:00

43 lines
1.2 KiB
Swift

import Testing
struct WatchMascotTests {
@Test func `approvals are attentive`() {
#expect(watchInboxMascotMood(
hasSnapshot: true,
hasApprovals: true,
hasChats: false) == .attentive)
}
@Test func `missing snapshot is thinking`() {
#expect(watchInboxMascotMood(
hasSnapshot: false,
hasApprovals: false,
hasChats: false) == .thinking)
}
@Test func `empty synchronized inbox is sleepy`() {
#expect(watchInboxMascotMood(
hasSnapshot: true,
hasApprovals: false,
hasChats: false) == .sleepy)
}
@Test func `synchronized chats are idle`() {
#expect(watchInboxMascotMood(
hasSnapshot: true,
hasApprovals: false,
hasChats: true) == .idle)
}
@Test func `approval and snapshot precedence wins over chats`() {
#expect(watchInboxMascotMood(
hasSnapshot: false,
hasApprovals: true,
hasChats: true) == .attentive)
#expect(watchInboxMascotMood(
hasSnapshot: false,
hasApprovals: false,
hasChats: true) == .thinking)
}
}