Files
openclaw/apps/macos/Tests/OpenClawIPCTests/CritterIconRendererTests.swift

38 lines
979 B
Swift
Raw Normal View History

import AppKit
import Testing
2026-01-30 03:15:10 +01:00
@testable import OpenClaw
@Suite
@MainActor
struct CritterIconRendererTests {
@Test func makeIconRendersExpectedSize() {
let image = CritterIconRenderer.makeIcon(
blink: 0.25,
legWiggle: 0.5,
earWiggle: 0.2,
earScale: 1,
earHoles: true,
badge: nil)
#expect(image.size.width == 18)
#expect(image.size.height == 18)
#expect(image.tiffRepresentation != nil)
}
@Test func makeIconRendersWithBadge() {
let image = CritterIconRenderer.makeIcon(
blink: 0,
legWiggle: 0,
earWiggle: 0,
earScale: 1,
earHoles: false,
badge: .init(symbolName: "terminal.fill", prominence: .primary))
#expect(image.tiffRepresentation != nil)
}
2025-12-24 17:42:34 +01:00
@Test func critterStatusLabelExercisesHelpers() async {
await CritterStatusLabel.exerciseForTesting()
}
}