feat(race-setup): group the race list into today, upcoming and folded done, with progress and search (1.52.0)
This commit is contained in:
1 parent
b2e08db3d8
commit
b23410c190
13 files changed
+213
-29
No files matched your search
@@ -107,4 +107,17 @@ export async function runRaceSetupSmoke({ evaluate, navigate, fill, savedState,
|
||||
return order.includes(q12.id) && order.indexOf(q12.id) < order.indexOf(q11.id);
|
||||
}, "the order is saved on the race");
|
||||
console.log("PASS Race Setup lists sessions in running order and ▲▼ change it");
|
||||
|
||||
// The race list: races from past dates are folded away under Done; search finds them.
|
||||
await navigate("race_setup", "raceWizardStepForm");
|
||||
const raceId = (await raceState()).id;
|
||||
assert.equal(await evaluate(`document.querySelector('[data-event-row="${raceId}"]').closest("details")?.id || ""`), "eventListDone", "a race from a past date is under Done");
|
||||
assert.equal(await evaluate(`document.getElementById("eventListDone").open`), false, "Done is folded by default");
|
||||
if (await evaluate(`Boolean(document.getElementById("eventListSearch"))`)) {
|
||||
await evaluate(`(() => { const box = document.getElementById("eventListSearch"); box.value = "endurance"; box.dispatchEvent(new Event("input")); })()`);
|
||||
assert.equal(await evaluate(`document.getElementById("eventListDone").open`), true, "search opens Done");
|
||||
assert.equal(await evaluate(`document.querySelector('[data-event-row="${raceId}"]').hidden`), false);
|
||||
assert.ok(await evaluate(`[...document.querySelectorAll("[data-event-row]")].some((row) => row.hidden)`), "other races are filtered out");
|
||||
}
|
||||
console.log("PASS Race Setup groups races into today, upcoming and a folded Done list, with search");
|
||||
}
|
||||
Reference in new issue
Block a user