mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-10 13:00:45 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
36 lines
990 B
Swift
36 lines
990 B
Swift
import AppKit
|
|
import Testing
|
|
@testable import OpenClaw
|
|
|
|
@MainActor
|
|
struct CritterIconRendererTests {
|
|
@Test func `make icon renders expected size`() {
|
|
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 `make icon renders with badge`() {
|
|
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)
|
|
}
|
|
|
|
@Test func `critter status label exercises helpers`() async {
|
|
await CritterStatusLabel.exerciseForTesting()
|
|
}
|
|
}
|