summaryrefslogtreecommitdiffstats
path: root/docs/TESTING.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/TESTING.md')
-rw-r--r--docs/TESTING.md46
1 files changed, 45 insertions, 1 deletions
diff --git a/docs/TESTING.md b/docs/TESTING.md
index 23e3a19..f42b84a 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -3,7 +3,7 @@
3## Automated suite 3## Automated suite
4 4
5```sh 5```sh
6cargo test 6cargo test --workspace
7``` 7```
8 8
9The suite is deterministic and headless: no network, no PTY, no sleeps, no 9The suite is deterministic and headless: no network, no PTY, no sleeps, no
@@ -46,10 +46,14 @@ or a vendored OpenSSL.
46| `tests/slots.rs` | Server slots payout rules and overflow handling. | 46| `tests/slots.rs` | Server slots payout rules and overflow handling. |
47| `tests/storage.rs` | Client/server SQLite storage helpers. | 47| `tests/storage.rs` | Client/server SQLite storage helpers. |
48| `tests/tofu.rs` | SPKI fingerprint and TOFU decisions. | 48| `tests/tofu.rs` | SPKI fingerprint and TOFU decisions. |
49| `gui/tests/layout.rs` | GUI presentation maths: money grouping, wheel angle, table aspect, bet names. |
49 50
50`tests/tofu.rs` and `tests/server_setup.rs` shell out to `openssl`, so run them 51`tests/tofu.rs` and `tests/server_setup.rs` shell out to `openssl`, so run them
51on a machine where the `openssl` CLI is available. 52on a machine where the `openssl` CLI is available.
52 53
54The GUI has its own integration tests because the root package cannot depend on
55the GUI (`gui/tests/`); `cargo test --workspace` runs both halves.
56
53## Development resets 57## Development resets
54 58
55The server creates `server.db` in its working directory. The client keeps 59The server creates `server.db` in its working directory. The client keeps
@@ -67,6 +71,21 @@ rm -rf ~/.local/share/zagan-bet
67The audit schema is not auto-migrated from the pre-2.0 slots-only `plays` 71The audit schema is not auto-migrated from the pre-2.0 slots-only `plays`
68table. Starting against an old database will fail until it is removed. 72table. Starting against an old database will fail until it is removed.
69 73
74## Building the GUI
75
76The GUI is a workspace member, so it never enters the TUI or server build graph:
77
78```sh
79cargo build -p zagan-bet-gui # debug
80cargo build -p zagan-bet-gui --profile gui-release # release
81cargo build -p zagan-bet-gui --target x86_64-pc-windows-gnu \
82 --profile gui-release # Windows
83```
84
85`gui-release` is declared at the workspace root; a profile inside a member's
86manifest would be ignored. Fonts are embedded, so there is no runtime asset
87directory to ship.
88
70## Manual TUI checklist 89## Manual TUI checklist
71 90
72There is no CI. Run this on Linux and on a Windows VM before a release. 91There is no CI. Run this on Linux and on a Windows VM before a release.
@@ -97,6 +116,31 @@ Use an 80-column terminal because several output lines are width-sensitive.
97 under a single fingerprint, because the certificate key is the same. 116 under a single fingerprint, because the certificate key is the same.
9811. Windows: repeat 2-10 and confirm keys are not duplicated or printed twice. 11711. Windows: repeat 2-10 and confirm keys are not duplicated or printed twice.
99 118
119## Manual GUI checklist
120
121The GUI is a style spike until Phase 4: the table and wheel are painted from a
122demo `RouletteView`, and no network connection is made. Run it on Linux and on
123Windows 10 before approving the look.
124
1251. `cargo run -p zagan-bet-gui` at 1440x900, then at 1920x1080. The header
126 keeps its right margin at both sizes and shows ONLINE, host, ping, account
127 and balance; the table is centred and the sidebar is full height.
1282. The felt shows 0, the 3x12 numbers, dozens, columns and the six outside
129 cells. Chips sit on their targets: a straight in the cell, a corner on the
130 lattice crossing, an outside bet in its box.
1313. Click a pocket: a chip of the selected denomination appears and the slip
132 gains a row. Chips are 10/25/50/100; the selected one has a cyan ring.
1334. Arrow keys move the cursor. Over the numbers the cyan marker sits on the
134 cell or lattice point and the covered cells tint; leaving the table walks
135 dozens, columns and outside.
1365. Space or SPIN animates the wheel for about 2.4 s and stops with the winning
137 pocket under the pointer. The winning cell gets a gold outline, RESULT names
138 the number and colour, and LAST gains a dot. SPIN is disabled during the
139 spin.
1406. Clear bets empties the slip and the total. Resize to 1100x720: the sidebar
141 scrolls, nothing overlaps the header, and the table keeps its aspect ratio.
1427. Compare the 1080p window against the approved reference screenshot.
143
100## Manual roulette checklist 144## Manual roulette checklist
101 145
1021. `play roulette` draws the full felt: 0, the 3x12 numbers, dozens, columns, 1461. `play roulette` draws the full felt: 0, the 3x12 numbers, dozens, columns,