feat(soak): SessionPool — seed, login, acquire contexts
Owns BrowserContexts, seeds via POST /api/auth/register with the invite code on cold start, warm-starts via localStorage injection of the cached JWT, falls back to POST /api/auth/login if the token is rejected. Exposes acquire(n) for scenarios. Infrastructure changes needed to import the real GolfBot class from tests/e2e/bot/ without the Task-10 structural-interface workaround: - Add @playwright/test as devDep so value-imports in e2e/bot/*.ts resolve at runtime (Page/Locator/expect are pulled even as types) - Remove rootDir from tsconfig so TS follows cross-package imports; add a paths entry so TS can resolve @playwright/test from the soak package's node_modules when compiling files under tests/e2e/bot - Drop the local GolfBot structural interface + its placeholder GamePhase/StartGameOptions/TurnResult types; re-export the real class from types.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
"ws": "^8.16.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.40.0",
|
||||
"tsx": "^4.7.0",
|
||||
"@types/ws": "^8.5.0",
|
||||
"@types/node": "^20.10.0",
|
||||
|
||||
Reference in New Issue
Block a user