Capture team chat and expose moderation match archives

This commit is contained in:
2026-10-17 20:11:49 -04:00
parent b678de2f6f
commit 870f13b150
28 changed files with 943 additions and 81 deletions
+26
View File
@@ -123,6 +123,32 @@ function expectExplanation(totals: boolean) {
}
describe('match result score presentation', () => {
it.each(['interrupted', 'end-report-missing', 'active'] as const)(
'describes %s archives as observed reports without final result claims',
(status) => {
const archived = match([player({ highestRound: 1, presentAtEnd: false })]);
archived.status = status;
archived.observedRound = 1;
archived.finalRound = null;
archived.endedAt = null;
archived.endPlayers = null;
archived.durationMs = null;
show(archived);
expect(document.body.textContent).toContain(
status === 'interrupted'
? 'Interrupted'
: status === 'end-report-missing'
? 'End report missing'
: 'Not reporting'
);
expect(document.body.textContent).toContain('Highest observed round');
expect(document.body.textContent).toContain('Last reported');
expect(document.querySelector('tbody')?.textContent).toContain('Recorded participant');
expect(document.body.textContent).not.toContain('At match end');
expect(document.body.textContent).not.toContain('Players at end');
expect(document.body.textContent).not.toContain('Final round');
}
);
it('shows recorded totals instead of balances, including totals for departed players', () => {
show(match([player(), player({ guid: '202', presentAtEnd: false, scoreTotal: 6500 })]));
expectScores('Total score', ['8,470', '6,500']);