feat(export): CSV for a whole race day from the results archive and series rounds (1.89.40)
This commit is contained in:
1 parent
10b5d0a447
commit
7af4a81aaa
12 files changed
+212
-14
No files matched your search
@@ -24,11 +24,15 @@ export async function runArchiveQualifyingSmoke({ evaluate, navigate, savedState
|
||||
|
||||
await navigate("archive", "archiveDriverFilter");
|
||||
await waitFor(async () => evaluate(`Boolean(document.querySelector('[data-archive-event="aq_event"]'))`), "the race is in the archive");
|
||||
// Race day CSV: off until one date is picked (from = to).
|
||||
assert.equal(await evaluate(`document.getElementById("archiveDayCsv").disabled`), true, "day CSV waits for a date");
|
||||
for (const id of ["archiveDateFrom", "archiveDateTo"]) await evaluate(`(() => { const input = document.getElementById("${id}"); input.value = "${event.date}"; input.dispatchEvent(new Event("change")); })()`);
|
||||
await waitFor(async () => evaluate(`document.getElementById("archiveDayCsv")?.disabled === false`), "day CSV is on for one date");
|
||||
await evaluate(`document.querySelector('[data-archive-event="aq_event"]').click()`);
|
||||
await waitFor(async () => evaluate(`Boolean(document.querySelector('[data-archive-open="aq_f1"]'))`), "the final heat is listed");
|
||||
await evaluate(`document.querySelector('[data-archive-open="aq_f1"]').click()`);
|
||||
await waitFor(async () => evaluate(`Boolean(document.querySelector(".archive-detail .tq-badge"))`), "the final heat shows TQ");
|
||||
const rows = await evaluate(`[...document.querySelectorAll(".archive-detail tbody tr")].slice(0, 2).map((row) => [...row.children].slice(0, 3).map((cell) => cell.textContent.trim()))`);
|
||||
assert.deepEqual(rows, [["1", "2", "AQ Winner"], ["2", "TQ", "AQ Pole"]], "winner qualified 2nd, the pole sitter finished 2nd");
|
||||
console.log("PASS results archive: a final heat shows each driver's qualifying place with TQ for the top qualifier");
|
||||
console.log("PASS results archive: a final heat shows each driver's qualifying place with TQ for the top qualifier; day CSV turns on for one date");
|
||||
}
|
||||
Reference in new issue
Block a user