feat: Scoreboard: Ranking, Matrix, Event Log and Score Graph 1.00

This commit is contained in:
OpenVelo Agent
2026-07-23 05:42:15 +00:00
parent d0c2107efc
commit da5a4451b2
10 changed files with 102 additions and 168 deletions
+6 -2
View File
@@ -46,6 +46,8 @@ describe('parseSolveEventIntoRanking', () => {
];
const next = parseSolveEventIntoRanking(rows, {
challengeId: 'c1',
challengeName: 'alpha',
categoryAbbreviation: 'CRY',
playerId: 'p2',
playerName: 'p2',
awardedPoints: 50,
@@ -90,7 +92,7 @@ describe('applySolveToGraph', () => {
};
const next = applySolveToGraph(
baseView,
{ challengeId: 'c1', playerId: 'p0', playerName: 'p0', awardedPoints: 30, rankBonus: 0, awardedAtUtc: '2025-01-01T06:00:00.000Z', position: 2 },
{ challengeId: 'c1', challengeName: 'alpha', categoryAbbreviation: 'CRY', playerId: 'p0', playerName: 'p0', awardedPoints: 30, rankBonus: 0, awardedAtUtc: '2025-01-01T06:00:00.000Z', position: 2 },
'2025-01-01T00:00:00.000Z',
'2025-01-02T00:00:00.000Z',
'2025-01-01T12:00:00.000Z',
@@ -105,7 +107,7 @@ describe('applySolveToGraph', () => {
it('returns empty when event is not configured', () => {
const next = applySolveToGraph(
null,
{ challengeId: 'c1', playerId: 'p0', playerName: 'p0', awardedPoints: 30, rankBonus: 0, awardedAtUtc: '2025-01-01T06:00:00.000Z', position: 1 },
{ challengeId: 'c1', challengeName: 'alpha', categoryAbbreviation: 'CRY', playerId: 'p0', playerName: 'p0', awardedPoints: 30, rankBonus: 0, awardedAtUtc: '2025-01-01T06:00:00.000Z', position: 1 },
null,
null,
'2025-01-01T12:00:00.000Z',
@@ -123,6 +125,8 @@ describe('mutateMatrixFromSolve', () => {
};
const next = mutateMatrixFromSolve(matrix, {
challengeId: 'c1',
challengeName: 'alpha',
categoryAbbreviation: 'CRY',
playerId: 'p2',
playerName: 'p2',
awardedPoints: 50,