test(e2e): start the plugin modal settle check once the sheet is in view (#9889)
The compact sheet holds below the viewport for a few frames before it slides up. On a slow runner two settle reads 100 ms apart can both land in that hold. Waiting for the title to enter the viewport first means the settle check only starts once the slide has begun. 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:
1 parent
791bbd3596
commit
6ef188416f
1 file changed
+3
-2
@@ -7,9 +7,10 @@ import { waitForSettledPosition } from "../support/helpers/sheet-layout";
|
||||
async function openExample(page: Page, example: string) {
|
||||
await page.getByRole("button", { name: `Open ${example}`, exact: true }).click();
|
||||
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.
|
||||
// stops lands on whatever slides under it. The settle check starts once the slide has begun;
|
||||
// two equal reads during the hold would otherwise count as settled.
|
||||
await expect(title).toBeInViewport();
|
||||
await waitForSettledPosition(title);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user