дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
test(services): deflake virtual-row drag scrolling (#8271)
The virtual-row service drag test required 1000px of animation-frame-driven auto-scroll within the default poll timeout; a busy CI runner reached 968px. It now waits for the distance that actually detaches the dragged row (third row plus twelve overscan rows) with more time for slow frames. Co-authored-by: arookieofc-ai <[email protected]>
Цей коміт міститься в:
1 джерело
305b8c7eec
коміт
4650d88b73
1 file changed
+5
-1
@@ -146,6 +146,7 @@ test("service pointer ordering works for Java and npm and survives reload", asyn
|
||||
});
|
||||
|
||||
test("service dragging scrolls across virtual rows without losing source identity", async ({ workbench: page }) => {
|
||||
test.setTimeout(45_000);
|
||||
await configure(page, 100);
|
||||
const tree = page.getByRole("tree", { name: "Services", exact: true });
|
||||
const source = tree.getByRole("treeitem", { name: "portal", exact: true });
|
||||
@@ -156,7 +157,10 @@ test("service dragging scrolls across virtual rows without losing source identit
|
||||
await page.mouse.move(from.x + 70, from.y + from.height / 2);
|
||||
await page.mouse.down();
|
||||
await page.mouse.move(bounds.x + 100, bounds.y + bounds.height - 5, { steps: 8 });
|
||||
await expect.poll(() => tree.evaluate((el) => el.scrollTop)).toBeGreaterThan(1000);
|
||||
// Portal is the third row and the tree renders twelve overscan rows, so sixteen row heights
|
||||
// are enough to detach it; a fixed 1000px depended on a busy runner's animation-frame rate.
|
||||
const virtualized = Math.ceil(16 * from.height);
|
||||
await expect.poll(() => tree.evaluate((el) => el.scrollTop), { timeout: 20_000 }).toBeGreaterThan(virtualized);
|
||||
const target = tree.getByRole("treeitem", { name: "app-99", exact: true });
|
||||
await target.scrollIntoViewIfNeeded();
|
||||
const to = await target.boundingBox();
|
||||
|
||||
Reference in new issue
Заблокувати користувача