summaryrefslogtreecommitdiffstats
path: root/docs/TESTING.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/TESTING.md52
1 files changed, 43 insertions, 9 deletions
diff --git a/docs/TESTING.md b/docs/TESTING.md
index 09ceb82..fbd510b 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -210,9 +210,9 @@ terminal client; a saved login from one signs in the other.
210 210
2111. `play crash` shows the ready board with a 1.00x multiplier; Space starts and 2111. `play crash` shows the ready board with a 1.00x multiplier; Space starts and
212 reserves the bet. 212 reserves the bet.
2132. The multiplier rises smoothly with no network traffic. Cash out with C and 2132. The multiplier rises smoothly from the server-clock anchor and is refreshed
214 confirm the board shows the cashout multiplier, the payout and the new 214 by 10 Hz ticks. Cash out with C and confirm the board shows the cashout
215 balance. 215 multiplier, the payout and the new balance.
2163. On another round, press nothing. The board must switch to `CRASHED at Xx` 2163. On another round, press nothing. The board must switch to `CRASHED at Xx`
217 by itself when the crash point is reached, and the bet must be lost. 217 by itself when the crash point is reached, and the bet must be lost.
2184. Press C just as a round crashes. Either it pays or the crashed result wins; 2184. Press C just as a round crashes. Either it pays or the crashed result wins;
@@ -220,8 +220,11 @@ terminal client; a saved login from one signs in the other.
2205. Q during a live round forfeits the bet; Q when idle just leaves. 2205. Q during a live round forfeits the bet; Q when idle just leaves.
2216. Check the audit rows: one per round, `game_type = crash`, the reserved bet, 2216. Check the audit rows: one per round, `game_type = crash`, the reserved bet,
222 the payout, and `crash_point`/`multiplier`/`result` in `details`. 222 the payout, and `crash_point`/`multiplier`/`result` in `details`.
2237. Confirm the crash point is absent from the `CRASH_START` line (it must only 2237. Confirm the crash point and seed are absent from the `CRASH_START` message;
224 appear once the round is over). 224 only `commit` and `started_at` appear. When the round ends, `seed` appears
225 and `sha256(seed) == commit`; recompute the crash point from the seed.
2268. Confirm `CRASH_BUSTED` is an `EVT`, not a `RES`, and that a second poll
227 produces no repeated settlement.
225 228
226## Manual restart check 229## Manual restart check
227 230
@@ -237,7 +240,7 @@ terminal client; a saved login from one signs in the other.
237 240
2381. Connect a client and server from the same release: the client connects and 2411. Connect a client and server from the same release: the client connects and
239 the server log shows the `HELLO` exchange. 242 the server log shows the `HELLO` exchange.
2402. Connect a 4.x client to a 3.x server (or the reverse): the client must print 2432. Connect a 5.x client to a 4.x server (or the reverse): the client must print
241 `Version mismatch: client ..., server ...` and never reach the login prompt. 244 `Version mismatch: client ..., server ...` and never reach the login prompt.
2423. With a deliberately skew-built server (PATCH differs) the connection is 2453. With a deliberately skew-built server (PATCH differs) the connection is
243 accepted and, when the server's version is newer, the client prints 246 accepted and, when the server's version is newer, the client prints
@@ -269,9 +272,11 @@ terminal client; a saved login from one signs in the other.
269 272
270## Packaging checklist 273## Packaging checklist
271 274
2721. Set the version in `Cargo.toml` and `gui/Cargo.toml` (same MAJOR.MINOR), 2751. Set the version in `Cargo.toml`, `gui/Cargo.toml` and `webd/Cargo.toml`
273 run `cargo test --workspace`, and commit. `publish.sh` refuses a dirty tree 276 (same MAJOR.MINOR), run `cargo test --workspace`, build the browser app
274 because the site links the committed git history as the GPL source. 277 (`cd web/play && npm ci && npm run build`), and commit. `publish.sh` refuses
278 a dirty tree because the site links the committed git history as the GPL
279 source.
2752. `./scripts/publish.sh` (add `DEST=` to stage elsewhere). It builds the GUI 2802. `./scripts/publish.sh` (add `DEST=` to stage elsewhere). It builds the GUI
276 with `gui-release` and the terminal clients and servers. The installers are 281 with `gui-release` and the terminal clients and servers. The installers are
277 stable site files and are not regenerated. 282 stable site files and are not regenerated.
@@ -284,4 +289,33 @@ terminal client; a saved login from one signs in the other.
284 menu entry. It must install the newest version even when an older app sits 289 menu entry. It must install the newest version even when an older app sits
285 next to it, and refuse a corrupted download. 290 next to it, and refuse a corrupted download.
2865. Repeat on Windows for the `.ps1` installer and the Start-menu shortcut. 2915. Repeat on Windows for the `.ps1` installer and the Start-menu shortcut.
2926. Start `webd` against the staging server with a pinned fingerprint and open
293 `/play/` through nginx. Run the manual web checklist below.
294
295## Manual web checklist
296
2971. Open `/play/` in a fresh browser. The auth card must appear; the top bar
298 must not claim a balance until login.
2992. Register, then log in with the password. The lobby must show 1 000 Kr and
300 every game. Refresh the page; the session cookie must reattach and the
301 balance must survive (within `ZAGAN_GRACE_SECONDS`).
3023. Open the same URL in a second tab. The first tab must show "Opened in
303 another tab" and stop reconnecting; the second must continue.
3044. Slots: spin and watch the reels settle on the server result; check the
305 payout and balance. Roulette: place straight, dozen, column and outside
306 chips, right-click one back, clear, spin, and confirm the result.
3075. Blackjack: deal, hit/stand/double, then deal again; forfeiting must warn
308 and lose the reserved bet.
3096. Crash: start a round, watch the curve and ticks, cash out; on another
310 round let it bust. Confirm the reveal line shows `sha256(seed) == commit`
311 and the recomputed crash point matches.
3127. Refresh in the middle of a live crash round. The current view must return
313 with the same `commit` and a rising multiplier; the round must still settle.
3148. Close the tab mid-round and wait past the grace window. The next visit must
315 log in again, and the server must have forfeited the round.
3169. Stop the gateway. The browser must show the reconnect overlay, then recover
317 when `webd` returns. Stop it for longer than the grace window: the round is
318 forfeited and a login is required.
31910. Check the browser console: no credential is stored, the cookie is HttpOnly,
320 and the only network target is `/ws`.
287 321