Repository navigation
test(e2e): the drag test samples the hand's start at mousedown (T-104) - #94
Merged
Merged
Conversation
The fourth T-104 test compared the post-drag camera against a live sample taken BEFORE `mouse.down()`, while the flight was still moving. On a slow runner the flight's own motion between that sample and the mousedown ran opposite to the 160x120px pan and cancelled most of it: CI read 0.00055 against the 0.001 floor (run 33586396145, PR #93). The pan handler is `activateOnStart`, so the mousedown itself calls `stop(true)` and freezes the camera; sampling right after it isolates the hand's effect exactly. The fixed 400 ms inertia wait is now a poll on `!map.isMoving()`, so the `moveend` the store publishes on has fired before the position is read. Verified: 12/12 with `--workers=2 --repeat-each=3`; under a load average above 150 (a parallel `--repeat-each=5` on this machine) the spec's other tests also timed out, which is the runner, not the change. Task: T-104
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The T-104 drag test measured the flight, not the hand
e2e/awakening-flight.spec.ts's fourth test sampled the live camera beforemouse.down()while the flight was still in the air, then compared the post-drag camera against it. On CI (run 33586396145, the first check of PR #93) the flight's own motion between the sample and the mousedown ran opposite to the 160×120 px pan and cancelled most of it:dragDeltaread 0.00055 against the 0.001 floor. The same test passed CI on PR #92 by timing.The fix (spec only)
beforeDragright aftermouse.down(). MapLibre's pan handler isactivateOnStart, so the mousedown alone makes the handler manager callstop(true)(maplibre-gl-dev.mjs:21620) and the camera is frozen until the first pan delta — the sample now isolates the hand's effect exactly.waitForFunction(() => !map.isMoving()), so themoveendthe store publishes on has fired before the position is read.No product code changes.
How verified
pnpm exec playwright test e2e/awakening-flight.spec.ts --workers=2 --repeat-each=3: 12 passed, 0 skipped.pnpm exec eslint e2e/awakening-flight.spec.ts,pnpm exec tsc --noEmit: clean.--repeat-each=5run with the default worker count pushed this machine's load average above 150 and timed out three of the spec's tests (including two this PR does not touch, at the 30 s test timeout). That is the runner, not the change — the rerun at 2 workers on a settled machine was fully green — but it is a reminder that every flight test here has a ~2 s animation with a 6 s arrival budget.Task: T-104