Preserve fleet match timing across empty telemetry
CI / checks (push) Successful in 4m46s

This commit is contained in:
2026-10-09 19:41:55 -04:00
parent d1f581d6a8
commit ce6dba17e6
12 changed files with 171 additions and 53 deletions
+9
View File
@@ -88,6 +88,15 @@ describe('compact server cards', () => {
expect(body).not.toContain('36ms');
});
it('shows a known round without a match clock and hides match metrics for an empty lobby', () => {
const occupied = html({ gameStartedAt: null, round: 31 });
expect(occupied).toMatch(/<dt[^>]*>Round<\/dt>\s*<dd[^>]*>31<\/dd>/);
expect(occupied).toMatch(/<dt[^>]*>Match time<\/dt>\s*<dd[^>]*>—<\/dd>/);
const empty = html({ players: 0, round: 31, compactEmpty: false });
expect(empty).toMatch(/<dt[^>]*>Round<\/dt>\s*<dd[^>]*>—<\/dd>/);
expect(empty).toMatch(/<dt[^>]*>Match time<\/dt>\s*<dd[^>]*>—<\/dd>/);
});
it('places Pin outside the only link and retains its pressed state and server name', () => {
const body = html({ pinned: true, onPin: () => {} });
expect(body).toMatch(/<article\b/);