Fix lobby jank

This commit is contained in:
Joey Yakimowich-Payne 2026-01-16 10:24:47 -07:00
commit c98e262fd0
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
2 changed files with 108 additions and 45 deletions

View file

@ -99,13 +99,15 @@ describe('Lobby', () => {
it('displays game PIN', () => {
render(<Lobby {...defaultProps} />);
expect(screen.getByText('ABC123')).toBeInTheDocument();
const pins = screen.getAllByText('ABC123');
expect(pins.length).toBeGreaterThan(0);
});
it('displays quiz title on larger screens', () => {
it('displays quiz title on all screen sizes', () => {
render(<Lobby {...defaultProps} />);
expect(screen.getByText('Test Quiz')).toBeInTheDocument();
const titles = screen.getAllByText('Test Quiz');
expect(titles.length).toBeGreaterThan(0);
});
it('displays player count', () => {
@ -115,7 +117,8 @@ describe('Lobby', () => {
];
render(<Lobby {...defaultProps} players={players} />);
expect(screen.getByText('2')).toBeInTheDocument();
const counts = screen.getAllByText('2');
expect(counts.length).toBeGreaterThan(0);
});
it('shows waiting message when no players have joined', () => {