trails/e2e/helpers/planner.ts
Ullrich Schäfer 0b146f9b32
Split planner E2E tests into focused feature files
Breaks the monolithic planner.test.ts (581 lines, 25 tests) into five
focused files grouped by feature area, with BRouter mocked by default
via test.beforeEach in files that need routing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 21:58:10 +02:00

12 lines
444 B
TypeScript

import type { APIRequestContext, Page } from "@playwright/test";
export async function createSession(request: APIRequestContext): Promise<string> {
const response = await request.post("/api/sessions", { data: {} });
const { url } = await response.json();
return url;
}
export async function openSession(page: Page, url: string): Promise<void> {
await page.goto(url);
await page.getByText("Connected").waitFor({ timeout: 15000 });
}