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>
This commit is contained in:
parent
72c01eb18c
commit
0b146f9b32
14 changed files with 584 additions and 582 deletions
12
e2e/helpers/planner.ts
Normal file
12
e2e/helpers/planner.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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 });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue