feat(race-day): fold run heats in today's schedule and mark the next heat (1.54.0)
This commit is contained in:
1 parent
73e3d1ff75
commit
d0248b1960
9 files changed
+44
-12
No files matched your search
@@ -90,6 +90,17 @@ export async function runDayScheduleSmoke({ evaluate, navigate, savedState, wait
|
||||
assert.equal(await evaluate(`document.querySelector(".board-next").classList.contains("is-called")`), true);
|
||||
assert.equal(await evaluate(`document.querySelector(".board-next").dataset.boardSession`), "ds_4wd_q1", "in the day's order");
|
||||
console.log("PASS the drivers' board shows the next heats with their drivers, called heats highlighted");
|
||||
|
||||
// A run heat folds away on Race Day; the next one is marked.
|
||||
const now = Date.now();
|
||||
await patchState({ sessions: (await savedState()).sessions.map((session) => (session.id === "ds_4wd_q1" ? { ...session, status: "finished", startedAt: now - 400000, endedAt: now - 100000 } : session)), activeSessionId: "ds_2wd_q1" });
|
||||
await navigate("race_day", "daySchedule");
|
||||
await waitFor(async () => !(await rowIds()).includes("ds_4wd_q1"), "the run heat is folded away");
|
||||
assert.match(await evaluate(`document.getElementById("dayToggleDone").textContent`), /1 heats run/);
|
||||
assert.equal(await evaluate(`document.querySelector("tr.is-next")?.dataset.dayRow`), (await rowIds())[0], "the next heat is marked");
|
||||
await evaluate(`document.getElementById("dayToggleDone").click()`);
|
||||
await waitFor(async () => (await rowIds()).includes("ds_4wd_q1"), "and shown again on request");
|
||||
console.log("PASS today's schedule folds run heats into one line and marks the next heat");
|
||||
} finally {
|
||||
const current = await savedState();
|
||||
await patchState({
|
||||
|
||||
Reference in new issue
Block a user