Fix keyed telemetry match attribution (Refs #144)
CI / checks (push) Successful in 5m26s

This commit is contained in:
2026-10-12 00:58:05 -04:00
parent 4ea291d305
commit 785cc4616b
24 changed files with 1115 additions and 112 deletions
+35
View File
@@ -16,6 +16,8 @@ const match: ServerMatch = {
observedRound: 20,
finalRound: 20,
status: 'completed',
reporterMatchKey: null,
missingReports: null,
startedAt: '2026-10-06T17:26:00Z',
lastReportedAt: '2026-10-06T19:59:59Z',
endedAt: '2026-10-06T18:04:00Z',
@@ -154,6 +156,39 @@ it('labels unfinished rounds and missing durations without inventing final resul
expect(body).toContain('>—</span>');
expect(body).toContain('>0</td>');
});
it('labels and filters missing end reports and shows sequence gaps on desktop and mobile', () => {
scope('?matchStatus=end-report-missing');
const data = report();
data.matches = [
{
...match,
status: 'end-report-missing',
reporterMatchKey: 'game-a',
missingReports: 2,
finalRound: null,
durationMs: null
}
];
const body = render(MatchHistory, { props: { initial: data } }).body.replaceAll(
/<!--.*?-->/g,
''
);
for (const suffix of ['', '-mobile']) {
const select = body.match(
new RegExp(`<select\\b[^>]*id="match-status${suffix}"[^>]*>([\\s\\S]*?)</select>`)
)?.[1];
expect(select).toContain(
'<option value="end-report-missing" selected="">End report missing</option>'
);
}
const rows = body.slice(body.indexOf('<tbody'), body.indexOf('</tbody>'));
expect(rows.match(/End report missing/g)).toHaveLength(2);
expect(rows.match(/2 reports missing/g)).toHaveLength(2);
expect(rows).toContain('Highest observed');
expect(rows).not.toContain('<a');
expect(rows).not.toContain('In progress');
expect(rows).not.toContain('38m');
});
it.each([
'2026-10-06T19:58:29Z',
'2026-10-05T18:00:00Z',