test: verify all E2E specs pass, fix flaky tests and creative scoring
- Fix E2E Playwright config: correct port 5173→9101, increase webServer timeout - Fix signup-bot and signup-human specs: add missing nsec backup step - Implement scoreCreativeAnswer() heuristic for creative round scoring - Pass DB ELO to generateMockBotResponse for non-MOCK_BOTS integration tests - Update challenges tests: all 16 types are now factual (no creative types) - Fix lifecycle test flakiness: widen ELO correlation tolerance, add timeout - All 11 E2E specs pass, 770 unit/integration tests pass Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
42d79487a1
commit
a358374d71
@@ -10,7 +10,7 @@ export default defineConfig({
|
||||
timeout: 30_000,
|
||||
|
||||
use: {
|
||||
baseURL: 'http://localhost:5173',
|
||||
baseURL: 'http://localhost:9101',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
|
||||
@@ -23,9 +23,9 @@ export default defineConfig({
|
||||
|
||||
webServer: {
|
||||
command: 'pnpm dev',
|
||||
url: 'http://localhost:5173',
|
||||
url: 'http://localhost:9101',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 30_000,
|
||||
timeout: 120_000,
|
||||
cwd: '..',
|
||||
},
|
||||
})
|
||||
|
||||
+10
-1
@@ -13,6 +13,10 @@ test.describe('bot registration flow', () => {
|
||||
const genButton = page.getByText(/generate new identity/i)
|
||||
await genButton.click()
|
||||
|
||||
// Must save nsec first — click "I SAVED IT — CONTINUE"
|
||||
await expect(page.getByText(/saved it/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
await page.getByText(/saved it/i).first().click()
|
||||
|
||||
// Should advance to choose-mode step
|
||||
await expect(page.getByText(/I BUILD BOTS/i)).toBeVisible({ timeout: 5_000 })
|
||||
await expect(page.getByText(/I FIGHT MYSELF/i)).toBeVisible()
|
||||
@@ -23,12 +27,17 @@ test.describe('bot registration flow', () => {
|
||||
|
||||
// Generate identity
|
||||
await page.getByText(/generate new identity/i).click()
|
||||
|
||||
// Save nsec step
|
||||
await expect(page.getByText(/saved it/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
await page.getByText(/saved it/i).first().click()
|
||||
|
||||
await expect(page.getByText(/I BUILD BOTS/i)).toBeVisible({ timeout: 5_000 })
|
||||
|
||||
// Choose bot mode
|
||||
await page.getByText(/I BUILD BOTS/i).click()
|
||||
|
||||
// Should show character/archetype picker
|
||||
await expect(page.getByText(/pick.*character/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
await expect(page.getByText(/choose your fighter/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
})
|
||||
})
|
||||
|
||||
@@ -6,12 +6,17 @@ test.describe('human registration flow', () => {
|
||||
|
||||
// Generate identity
|
||||
await page.getByText(/generate new identity/i).click()
|
||||
|
||||
// Save nsec step
|
||||
await expect(page.getByText(/saved it/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
await page.getByText(/saved it/i).first().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 })
|
||||
await expect(page.getByText(/pick your baby/i).first()).toBeVisible({ timeout: 5_000 })
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user