feat(race): autopilot waits for qualifying from practice; qualifying start time per class (1.89.51)
This commit is contained in:
1 parent
57e081e291
commit
fbc4246a60
12 files changed
+114
-10
No files matched your search
@@ -109,6 +109,16 @@ export async function runRaceSetupSmoke({ evaluate, navigate, fill, savedState,
|
||||
const practiceHeats = (await savedState()).sessions.filter((session) => session.eventId === club.id && session.type === "practice");
|
||||
assert.ok(practiceHeats.every((session) => session.driverIds.length <= 2), `practice heats rebuilt with max 2 cars: ${practiceHeats.map((session) => session.name + ":" + session.driverIds.length)}`);
|
||||
console.log("PASS format change rebuilds the practice and qualifying heats (cars per heat, rounds)");
|
||||
// "Qualifying starts at": saved per class on the day plan, and cleared again.
|
||||
await waitFor(async () => Boolean(await evaluate('Boolean(document.getElementById("qualStartForm"))')), "qualifying start form");
|
||||
await fill("qualStartForm", { qualStart: "13:30" });
|
||||
await submit("qualStartForm");
|
||||
const expectedAt = new Date("2026-09-08T13:30:00").getTime();
|
||||
await waitFor(async () => ((await savedState()).raceDays || []).some((day) => day.date === "2026-09-08" && day.qualStartAt?.[club.id] === expectedAt), "qualifying start saved");
|
||||
await waitFor(async () => Boolean(await evaluate('Boolean(document.getElementById("qualStartClear"))')), "clear button");
|
||||
await click("qualStartClear");
|
||||
await waitFor(async () => !((await savedState()).raceDays || []).some((day) => day.date === "2026-09-08" && day.qualStartAt?.[club.id]), "qualifying start cleared");
|
||||
console.log("PASS qualifying start time is saved per class and cleared");
|
||||
}
|
||||
await navigate("race_setup", "raceWizardStepForm");
|
||||
await editEvent(race, "race_setup", "raceWizardStepForm");
|
||||
|
||||
Reference in new issue
Block a user