aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/table_ux_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-30 03:55:37 -0400
committerhistoria <[not public]>2026-09-30 03:55:37 -0400
commit735428f0667f67c12fdf3caca872d7dc65e2ce26 (patch)
tree92c9931f223bfd50ced4f1954130d879640a435b /internal/casino/table_ux_test.go
parentffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a (diff)
downloadthehouseoficarus-735428f0667f67c12fdf3caca872d7dc65e2ce26.tar.gz
feat: restyle roulette presentation
Diffstat (limited to 'internal/casino/table_ux_test.go')
-rw-r--r--internal/casino/table_ux_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/internal/casino/table_ux_test.go b/internal/casino/table_ux_test.go
index 812bed0..cb13300 100644
--- a/internal/casino/table_ux_test.go
+++ b/internal/casino/table_ux_test.go
@@ -136,7 +136,7 @@ func TestQueuedLeaveAndSitoutPreserveCommittedBlackjackHands(t *testing.T) {
t.Fatalf("%s altered committed hand", action)
}
events := table.action("alice", "stand")
- if !hasMessage(events, "Net -10 credits") {
+ if !hasMessage(events, "{casino_payout}-10 credits{/}") {
t.Fatalf("missing settlement: %+v", events)
}
if action == "leave_after" && table.hasParticipant("alice") {
@@ -154,7 +154,13 @@ func TestSplitAndInsuranceRoundNetIncludesEveryStake(t *testing.T) {
p.hands = []*blackjackHand{{bet: 20, stood: true, cards: []card{{rank: "10"}, {rank: "10"}}}, {bet: 10, bust: true, cards: []card{{rank: "10"}, {rank: "10"}, {rank: "5"}}}}
p.insurance = 5
events := table.settle()
- for _, text := range []string{"Hand 1/2 | WIN | Net +20 credits | 40 returned", "Hand 2/2 | LOSS | Net -10 credits", "INSURANCE | Net -5 credits", "Round complete | Net +5 credits"} {
+ for _, text := range []string{
+ "{casino_result_win}WIN{/}",
+ "{casino_payout}+5 credits{/}",
+ "Hand 1/2:{/} {casino_result_win}+20 credits{/}",
+ "Hand 2/2:{/} {casino_result_loss}-10 credits{/}",
+ "Insurance:{/} {casino_result_loss}-5 credits{/}",
+ } {
if !hasMessage(events, text) {
t.Fatalf("missing %q in %+v", text, events)
}
@@ -184,7 +190,7 @@ func TestDepartingSettlementCarriesBalanceSummary(t *testing.T) {
events := table.settle()
found := false
for _, e := range events {
- if strings.Contains(e.Message, "Round complete") && e.ShowBalance {
+ if strings.Contains(e.PrivateMessage, "LOSS") && e.ShowBalance {
found = true
}
}