Bot registration (3 tests), human registration (1 test), fight replay (2 tests for JS error checking), and leaderboard (3 tests for rendering). All use Playwright with text-based selectors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
582 B
TypeScript
18 lines
582 B
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
test.describe('human registration flow', () => {
|
|
test('select human mode shows avatar picker', async ({ page }) => {
|
|
await page.goto('/join')
|
|
|
|
// Generate identity
|
|
await page.getByText(/generate new identity/i).click()
|
|
await expect(page.getByText(/I FIGHT MYSELF/i)).toBeVisible({ timeout: 5_000 })
|
|
|
|
// Choose human mode
|
|
await page.getByText(/I FIGHT MYSELF/i).click()
|
|
|
|
// Should show human avatar picker
|
|
await expect(page.getByText(/pick.*avatar/i).first()).toBeVisible({ timeout: 5_000 })
|
|
})
|
|
})
|