One deck form per session; rename leagues; e2e test script
- A player's deck for a night is edited in a single form and written to their match rows and their standings row, so the two can't disagree. Matches, standings and hand imports all fill blank decks from the decks already entered, whatever order the files are imported in. The imported standings table shows decks read-only. - Admins can rename a league. - test/e2e.sh runs end-to-end checks against the local podman stack (fixtures by default, or real exports: test/e2e.sh sampledata). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a99997b96d
commit
022d161934
6 files changed
+147
-36
No files matched your search
@@ -15,7 +15,8 @@ add `ALTER TABLE ... IF NOT EXISTS` statements to `init` or introduce a migratio
|
||||
- `src/standings.ts` pure leaderboard + deck-stats logic
|
||||
- `src/db.ts` pool, `tx()` helper, schema
|
||||
- `views/*.ejs` five pages. Every link/form action is prefixed with `<%= base %>` (BASE_PATH support)
|
||||
- `test/` `npm test` (node:test) with anonymised fixtures. `npm run check` type-checks.
|
||||
- `test/` `npm test` (node:test) with anonymised fixtures. `npm run check` type-checks. `test/e2e.sh [sampledata]`
|
||||
runs end-to-end checks (imports, decks, hand import, league rename/delete) against `scripts/local.sh up`.
|
||||
|
||||
## Rules and decisions
|
||||
- Scoring: match win 3, draw 1, loss 0, bye = 2-0 win. Session score = sum of that night's match points.
|
||||
@@ -27,7 +28,8 @@ add `ALTER TABLE ... IF NOT EXISTS` statements to `init` or introduce a migratio
|
||||
- Players are identified by real name (Melee `Team.Players[0].Name`, falling back to DisplayName, then Username),
|
||||
matched case-insensitively and created on first sight. Spelling differences create duplicate players.
|
||||
- No top cut will ever be used, so the standings importer takes the last round of the export.
|
||||
- Decks are free text, stored per player per session (Melee exports contain no deck names). `known` decks feed a datalist
|
||||
- Decks are free text, one per player per session (Melee exports contain no deck names), edited in one form and kept
|
||||
identical on the player's match rows and standings row; every import fills blanks from the decks already entered. `known` decks feed a datalist
|
||||
to avoid "Burn"/"burn" duplicates. Deck stats count whole-night results against the deck.
|
||||
- 1-on-1 matches only. Unreported matches (`HasResult` false) are skipped.
|
||||
|
||||
|
||||
Reference in new issue
Block a user