feat(series): run each round from the series page

Step 3 becomes a rounds table: pick drivers inline (copy from the
previous round, add a late entry), set qualifying rounds/finals/max
cars per heat per round, see the status, and create qualifying and
finals from there. Qualifying heats are now split evenly so nobody
drives alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
larssand
2026-10-11 18:55:36 +02:00
parent 581ec2c781
commit b5707f92d1
17 changed files with 447 additions and 39 deletions

View File

@@ -352,7 +352,9 @@ test("qualifying generation splits seeded drivers into every configured round",
assert.equal(created, 6);
assert.deepEqual(state.sessions.map((session) => session.name), ["Q1 H1", "Q2 H1", "Q1 H2", "Q2 H2", "Q1 H3", "Q2 H3"]);
assert.deepEqual(state.sessions[0].driverIds, ["driver_1", "driver_2", "driver_3"]);
assert.deepEqual(state.sessions[4].driverIds, ["driver_7"]);
// Seven drivers, max three per heat: 3 + 2 + 2 (never someone driving alone).
assert.deepEqual(state.sessions[2].driverIds, ["driver_4", "driver_5"]);
assert.deepEqual(state.sessions[4].driverIds, ["driver_6", "driver_7"]);
assert.equal(state.sessions[0].durationMin, 7);
assert.equal(state.sessions[0].seedMethod, "average");
assert.equal(state.sessions[0].followUpSec, 12);