This commit is contained in:
@@ -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/);
|
||||
|
||||
Reference in New Issue
Block a user