test: harden resize capture verification

Issue: #293
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-08-24 17:35:45 +03:00
parent 6c5163c3c9
commit c4694acea9
3 changed files with 7 additions and 3 deletions
+3 -1
View File
@@ -80,6 +80,7 @@ const target = await page.evaluate(() => {
start: [rect.left + rect.width / 2, rect.top + rect.height / 2],
end: screen(cx + 10 * (1000 / 240), cy),
mappedStart: screen(cx, cy),
hitWidth: rect.width,
count: handles.length,
};
});
@@ -148,9 +149,10 @@ if (target) {
// The second gesture leaves the circle by much more than its hit radius.
// Pointer capture must keep the real browser stream alive; Esc then cancels
// the already-visible overlay without a second persistence write.
const outsideDistance = Math.max(120, target.hitWidth * 2);
await page.mouse.move(...target.start);
await page.mouse.down();
await page.mouse.move(target.start[0] + 60, target.start[1], { steps: 12 });
await page.mouse.move(target.start[0] + outsideDistance, target.start[1], { steps: 12 });
await settle();
check('resize_pointer.capture_beyond_handle', await domHasSharedX(400), false);
await page.keyboard.press('Escape');
+2 -1
View File
@@ -171,7 +171,8 @@ building the preview frame itself.
- `demo/smoke_resize_pointer_real_plan.mjs`: the tracked second-floor fixture
entering through `config/get`, real browser mouse events, ten-grid-step live
preview and atomic commit, wall metadata, Undo, pointer capture outside the
handle, foreign-pointer isolation, Escape and capture-loss cancellation;
handle by at least two hit diameters, foreign-pointer isolation, Escape and
capture-loss cancellation;
- `test/resize-optimize.test.mjs` and
`demo/smoke_resize_outer_reconciliation.mjs`: an exact outer-wall partition
blocks a zero-range handle, Optimize safely rehosts its windows and removes
+2 -1
View File
@@ -43,7 +43,8 @@
ещё байт-в-байт исходный. Pointerup создаёт одну history-команду и одну
запись; wall count и набор толщин сохраняются; Ctrl+Z возвращает исходную
геометрию.
- [ ] Pointer capture продолжает жест более чем в 60 px от хэндла, чужой
- [ ] Pointer capture продолжает жест минимум в двух диаметрах и 120 px от
хэндла, чужой
pointer id игнорируется, а Escape и `lostpointercapture` возвращают DOM и
config без дополнительной записи.
- [ ] Невозможная физическая preview-геометрия останавливает стену на последней