add more stats to mobile profile

This commit is contained in:
larssand
2026-09-04 16:17:45 +02:00
parent 142c45be04
commit 4068cc7c19
13 changed files with 267 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ test("normalization removes invalid and duplicate training records", () => {
{ id: "lap_anonymous", sourceKey: "source_3", driverId: "", lapMs: 18000, timestamp: 4000 },
],
shares: [
{ driverId: "driver_1", token: "a".repeat(24), enabled: true },
{ driverId: "driver_1", token: "a".repeat(24), enabled: true, visibility: { history: false } },
{ driverId: "driver_1", token: "b".repeat(24), enabled: true },
{ driverId: "driver_2", token: "short", enabled: true },
],
@@ -65,6 +65,7 @@ test("normalization removes invalid and duplicate training records", () => {
assert.equal(normalized.goals[0].reward, "Badge");
assert.deepEqual(normalized.ledger.map((lap) => lap.id), ["lap_1"]);
assert.deepEqual(normalized.shares.map((share) => share.token), ["a".repeat(24)]);
assert.deepEqual(normalized.shares[0].visibility, { progress: true, achievements: true, performance: true, goals: true, history: false });
assert.equal(normalized.markers.length, 1);
assert.equal(normalized.markers[0].note, "New tires");
assert.equal(normalized.clubGoal.title, "Club to 10000");