fix(houseofrc): link hand-added drivers who enter later; fix qualifying rounds hint in the race wizard (1.84.1)
This commit is contained in:
1 parent
0a4c017e44
commit
f14cdb8c97
8 files changed
+27
-8
No files matched your search
@@ -104,6 +104,13 @@ test("House of RC re-fetch: late entries are added, withdrawn ones offered for r
|
||||
assert.deepEqual(event.houseOfRc.entryIds, { a: 11, late: 14 });
|
||||
assert.equal(drivers.find((driver) => driver.id === "late").transponder, "9");
|
||||
assert.deepEqual(diffHouseOfRcEntries({ ...event, raceConfig: { driverIds: ids } }, entries, drivers), { added: [], withdrawn: [] }, "fetching again finds nothing new");
|
||||
// The hand-added driver enters on House of RC later: linked, not added twice.
|
||||
event.raceConfig.driverIds = ids;
|
||||
const later = diffHouseOfRcEntries(event, [...entries, { entryId: 17, classId: 555, houseOfRcId: 10, name: "Hand Added", transponders: ["3"] }], drivers);
|
||||
assert.deepEqual(later.added.map((row) => [row.entry.name, Boolean(row.linkOnly)]), [["Hand Added", true]]);
|
||||
const linkedIds = applyHouseOfRcEntryChanges(event, drivers, later, { addIndexes: new Set([0]), removeIds: new Set(), makeDriver: () => { throw new Error("no new driver"); } });
|
||||
assert.deepEqual(linkedIds, ["a", "h", "late"], "same participants, same order");
|
||||
assert.equal(event.houseOfRc.entryIds.h, 17, "now gets its results sent");
|
||||
});
|
||||
|
||||
test("House of RC results: heats and qualifying without placings, then final placings by main", async () => {
|
||||
|
||||
Reference in new issue
Block a user