Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider also running an actionability check on the target (e.g. via
await targetElement.hover({ trial: true })orscrollIntoViewIfNeeded) before callingboundingBox()so the new hard failure on a null bbox is less likely to be triggered by transient layout/animation issues. - Since
dragElementis now tightly coupled to the globalpageinstance, it may be worth documenting or asserting that assumption (e.g. passingpagein explicitly) to avoid confusing failures if this helper is reused in multi-page or multi-context tests.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider also running an actionability check on the target (e.g. via `await targetElement.hover({ trial: true })` or `scrollIntoViewIfNeeded`) before calling `boundingBox()` so the new hard failure on a null bbox is less likely to be triggered by transient layout/animation issues.
- Since `dragElement` is now tightly coupled to the global `page` instance, it may be worth documenting or asserting that assumption (e.g. passing `page` in explicitly) to avoid confusing failures if this helper is reused in multi-page or multi-context tests.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
The reorder-loadpoints test in tests/loadpoint-sort.spec.ts intermittently deadlocked: the drag never produced a reorder, every retry kept seeing the original order. dragElement() read boundingBox() immediately after expectModalVisible(), but Bootstrap modals continue to slide and fade for ~150ms after becoming "visible" to Playwright. On slower runners the bbox landed mid-animation, mouse.down() then fired at stale coordinates and missed the draggable source, so @formkit/drag-and-drop never registered the gesture. Use Locator.hover() for the source — it runs Playwright's actionability checks, including the "stable" check that waits for animations to settle, before positioning the cursor. Also throw on a null target bbox so future regressions surface instead of silently no-oping. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5f8383e to
b13f9c6
Compare
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.
Uh oh!
There was an error while loading. Please reload this page.