From 49a02d8eb9b274fa8c54bb3f70a34c79e8729870 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Sat, 3 Oct 2026 21:24:55 +0200 Subject: [PATCH] test(app): name the split resize helper arguments --- .../app/e2e/browser/split-pane-resize.spec.ts | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/app/e2e/browser/split-pane-resize.spec.ts b/packages/app/e2e/browser/split-pane-resize.spec.ts index 60deaae182..20d05d1778 100644 --- a/packages/app/e2e/browser/split-pane-resize.spec.ts +++ b/packages/app/e2e/browser/split-pane-resize.spec.ts @@ -30,7 +30,13 @@ async function dragDivider(divider: Locator, deltaX: number): Promise { await page.mouse.up(); } -async function expectDividerFollowsDrag(page: Page, index: number): Promise { +async function expectDividerFollowsDrag({ + page, + index, +}: { + page: Page; + index: number; +}): Promise { const divider = splitDividers(page).nth(index); const before = await dividerX(divider); await dragDivider(divider, DRAG_DISTANCE); @@ -41,7 +47,13 @@ async function expectDividerFollowsDrag(page: Page, index: number): Promise { +async function splitRight({ + page, + expectedDividers, +}: { + page: Page; + expectedDividers: number; +}): Promise { await runWorkspaceActionFromCommandCenter(page, "Split pane right"); await expect(splitDividers(page)).toHaveCount(expectedDividers); } @@ -54,12 +66,12 @@ test.describe("Split pane resize", () => { await gotoWorkspace(page, workspace.workspaceId); await waitForWorkspaceTabsVisible(page); await clickNewChat(page); - await splitRight(page, 1); - await splitRight(page, 2); - await splitRight(page, 3); + await splitRight({ page, expectedDividers: 1 }); + await splitRight({ page, expectedDividers: 2 }); + await splitRight({ page, expectedDividers: 3 }); for (const index of [0, 1, 2]) { - await expectDividerFollowsDrag(page, index); + await expectDividerFollowsDrag({ page, index }); } } finally { await workspace.cleanup(); @@ -73,14 +85,14 @@ test.describe("Split pane resize", () => { await gotoWorkspace(page, workspace.workspaceId); await waitForWorkspaceTabsVisible(page); await clickNewChat(page); - await splitRight(page, 1); - await expectDividerFollowsDrag(page, 0); + await splitRight({ page, expectedDividers: 1 }); + await expectDividerFollowsDrag({ page, index: 0 }); - await splitRight(page, 2); - await splitRight(page, 3); + await splitRight({ page, expectedDividers: 2 }); + await splitRight({ page, expectedDividers: 3 }); for (const index of [0, 1, 2]) { - await expectDividerFollowsDrag(page, index); + await expectDividerFollowsDrag({ page, index }); } } finally { await workspace.cleanup();