feat(ux): run sessions from Race Day with quick actions
Race Day gets Start practice, New track layout and Create race, a session picker, only the buttons that apply, and New practice day (replaces Reset data on Timing; laps stay in the training stats). Timing is for following and links to Race Day. The Dashboard shows the three common tasks first. Guide, READMEs, screenshot and the "Run a session" video follow the flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a6789f42f
commit
c4df90706a
23 files changed
+344
-111
No files matched your search
@@ -37,15 +37,16 @@ export async function runPracticeResetSmoke({ evaluate, navigate, savedState, wa
|
||||
});
|
||||
|
||||
try {
|
||||
await navigate("timing", "resetSession");
|
||||
// "New practice day" lives on Race Day (it used to be "Reset data" on Timing).
|
||||
await navigate("race_day", "raceDayNewPracticeDay");
|
||||
// The laps were seeded straight into the results and haven't been synced into the training
|
||||
// stats yet - Reset itself must sync them before clearing (the case of laps driven since
|
||||
// the last save).
|
||||
const before = dialogs.length;
|
||||
await evaluate(`document.getElementById("resetSession").click()`);
|
||||
await evaluate(`document.getElementById("raceDayNewPracticeDay").click()`);
|
||||
await waitFor(async () => dialogs.slice(before).some((dialog) => dialog.type === "confirm" && /training|tränings/i.test(dialog.message)), "confirm says the laps stay in the training stats");
|
||||
// The Timing view recreates an empty result for the active session straight away - which
|
||||
// is why the old code lost the laps already on the next save, not only on the next lap.
|
||||
// A view can recreate an empty result for the active session straight away - which is why
|
||||
// the old code lost the laps already on the next save, not only on the next lap.
|
||||
await waitFor(async () => ((await savedState()).resultsBySession?.[practice.id]?.passings || []).length === 0, "timing data cleared");
|
||||
assert.deepEqual((await driverLaps()).sort(), [19000, 19500, 20000], "laps kept right after the reset");
|
||||
assert.equal((await savedState()).sessions.find((session) => session.id === practice.id).status, "running", "the practice keeps running");
|
||||
|
||||
Reference in new issue
Block a user