v1.7.0: multiplayer test coverage — player-scoped fixtures + N-player clock verification (ISS-116, ISS-113)
CI / build + unit + e2e (pull_request) Successful in 13m33s
CI / build + unit + e2e (pull_request) Successful in 13m33s
This commit is contained in:
+5
-2
@@ -9,8 +9,11 @@ import { expect } from '@playwright/test';
|
||||
|
||||
export const SESSION_KEY = 'flight.session'; // must match lib/authClient.ts
|
||||
|
||||
export async function mintPlayerSession(page: Page): Promise<string> {
|
||||
const res = await page.request.post('/api/test/mint-player-session');
|
||||
// v1.7.0 (ISS-116): optional username — mints a SECOND account with onboarding (the route has
|
||||
// supported the override since v1.1.0; this helper just never forwarded it). No arg = the suite's
|
||||
// usual local player, exactly as before.
|
||||
export async function mintPlayerSession(page: Page, username?: string): Promise<string> {
|
||||
const res = await page.request.post('/api/test/mint-player-session', { data: username ? { username } : {} });
|
||||
expect(res.status(), 'mint-player-session hook should be enabled in the CI stack (FLIGHT_TEST_HOOKS=1)').toBe(200);
|
||||
return ((await res.json()) as { sessionId: string }).sessionId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user