feat(training): fold-out practice stints with every lap time on Training and the driver's page (1.86.0)

This commit is contained in:
larssand committed 2026-11-09 22:31:52 +01:00
1 parent 3870510d8c
commit 73e1c0ccf3
16 files changed
+224 -5

No files matched your search

+9
View File
@@ -520,3 +520,12 @@ test("each class in a mobile profile carries the time of its latest lap, so the
profile = buildPublicTrainingProfile(state, DRIVER_ONE_TOKEN, new Date(now).toISOString());
assert.equal(lastLapAt("class_2"), now - 1000);
});
test("public profile stint summaries carry lap times only, for the fold-out stint cards", () => {
const profile = buildPublicTrainingProfile(buildState(), DRIVER_ONE_TOKEN, "");
const stints = profile.classProfiles[0].stats.stintSummaries;
assert.ok(stints.length > 0);
const laps = stints.flatMap((stint) => stint.laps);
assert.equal(laps.length, stints.reduce((sum, stint) => sum + stint.lapCount, 0));
laps.forEach((lap) => assert.deepEqual(Object.keys(lap).sort(), ["excluded", "lapMs"]));
});