import { render, screen } from '@solidjs/testing-library'
import { describe, expect, it, vi } from 'vitest'

import GameRoute from './Game'

vi.mock('@solidjs/router', () => ({
  useNavigate: () => vi.fn(),
}))

describe('GameRoute', () => {
  it('renders shared game UI components', () => {
    render(() => <GameRoute />)

    expect(screen.getByText('Partie')).toBeTruthy()
    expect(screen.getByLabelText('Ta réponse')).toBeTruthy()
    expect(screen.getByText('Essais')).toBeTruthy()
    expect(screen.getByRole('button', { name: 'Indice (score réduit)' })).toBeTruthy()
  })
})
