mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Its first run in the 00:12 suite: Chromium 248 passed, 1 failed - this test, on `expect(during.lane).toBe(120)`, received 0. Everything it exists for passed: the drag was really in progress, and neither the canvas nor the lane carried `dragscroll` while it was. The lane moved because the test grabbed the FIRST card of the FIRST list, which sits within 40px of the lane's left edge - EDGE_SIZE in imports/lib/boardAutoScroll.js. Inside that zone the drag's own auto-scroll takes over by design and moves the lane SCROLL_STEP (15px) per mouse event: eight moves, 120 - 8*15 = exactly the 0 that was read. That is #443 working (dragging a card toward an off-screen list scrolls the board), not the panning this test is about. Panning is 1:1 with the pointer and happens anywhere; edge auto-scroll happens only at an edge. So the test now drags in the middle: it measures the lane and canvas rectangles, picks the minicard with the most room inside a 70px margin on every side, and moves it along a short diagonal clamped to that box. If no card can be found that far from every edge - a viewport too small - it skips with that reason instead of measuring the wrong mechanism. The board is seeded with cards in four lists so such a card exists. Thanks to xet7 !