Files
pokerfreak/mac/Tests/Pruefung/StreamerSpec.swift
T
mmintelandClaude Opus 5.5 383f125769 Mac cockpit: catch up with WinUI (server-built live views, stakes, limits, sammler, statistik)
WinUI is ahead; the Swift app now draws what sicht/ precomputes instead of
computing its own views:
- Spielen page: live tables from sitzen.live (raster, kacheln, bereit, search,
  close question), "Gerade eben" from entscheidungen.feed, money from geld.anzeige
- Stakes priority with tables per stake (spielplan.stufen/stufen_tische);
  micro_only is gone
- Loss limits (deckel_einstellen), sammler in Zuschauer mode (main button
  becomes Sammeln starten/stoppen), "Nur offene Tische spielen", queue
- Statistik: full auswertung (key figures, EV/SD curve, bb/100 by ...,
  history, best times, play/opponent picture, tournaments)
- Small items: Spickzettel, streamer toggle, sendung_lesen, daily limits editor

Intentional deviations: "highest first" compares instead of 1e15 + bb (WinUI
cannot separate NL2 and NL5 there), a single table shows its tile, narrow
segment pickers fall back to menus. Plan: plans/2026-11-30_swift-winui-abgleich.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 09:55:51 +01:00

19 lines
673 B
Swift

import Testing
import CockpitKern
@Suite("Streamer-Modus im Kopf (virtueller Zeiger)")
struct StreamerSpec {
@Test("streamer wird gelesen, unabhängig von maus")
func gelesen() {
#expect(Hilfen.kopf(#"{"streamer":true,"maus":false}"#)?.streamer == true)
#expect(Hilfen.kopf(#"{"streamer":false,"maus":true}"#)?.streamer == false)
#expect(Hilfen.kopf(#"{"streamer":false,"maus":true}"#)?.maus == true)
}
@Test("fehlt das Feld oder hat es den falschen Typ, ist es nil")
func fehlt() {
#expect(Hilfen.kopf(#"{"laeuft":true}"#)?.streamer == nil)
#expect(Hilfen.kopf(#"{"streamer":"ja"}"#)?.streamer == nil)
}
}