test(e2e): wait for a plugin modal sheet to settle before using the pointer (#9884)

On compact layouts the sheet holds below the viewport and then slides up,
so the Horizontal tab hover could resolve its point mid-slide and the wheel
landed on the rows below the tabs. openExample now waits for the title to
stop moving.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
paseo-bot[bot]andClaude Opus 5.5 authored and GitHub committed 2026-11-16 15:48:36 +00:00
1 parent 6eb94611b3
commit c2a24ae81e
1 file changed
+6 -1
@@ -2,10 +2,15 @@ import { copyPluginExample } from "../support/helpers/plugin-fixture";
import { expect, test as base, type Page } from "../support/fixtures";
import { gotoAppShell } from "../support/helpers/app";
import { connectNewWorkspaceDaemonClient } from "../support/helpers/new-workspace";
import { waitForSettledPosition } from "../support/helpers/sheet-layout";
async function openExample(page: Page, example: string) {
await page.getByRole("button", { name: `Open ${example}`, exact: true }).click();
await expect(page.getByText(`Modal example: ${example}`, { exact: true })).toBeVisible();
const title = page.getByText(`Modal example: ${example}`, { exact: true });
await expect(title).toBeVisible();
// A compact sheet holds below the viewport and then slides up, so a pointer placed before it
// stops lands on whatever slides under it.
await waitForSettledPosition(title);
}
async function closeExample(page: Page) {