-
-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(pw): drag n drop issue #3692
Conversation
It's a Playwright issue in the feature implementation: microsoft/playwright#1094 We need to study the problem in more detail. Please don't merge it yet 🙏 |
lib/helper/Playwright.js
Outdated
async dragAndDrop(srcElement, destElement, options = { force: true }) { | ||
const src = new Locator(srcElement, 'css'); | ||
const dst = new Locator(destElement, 'css'); | ||
async dragAndDrop(srcElement, destElement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand well, it would break my use case because you removed the options parameter:
// Move the object from default to initial position
I.dragAndDrop(konvajsFragment.gameArea, konvajsFragment.gameArea, {
sourcePosition: OBJECT_DEFAULT_POSITION,
targetPosition: OBJECT_INITIAL_POSITION,
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with the new implementation, I don't feel like we need the options parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kobenguyent
My use case is "Move an object from one position to another one inside an area (canvas)". Therefore I need to pass source and target coordinates to I.dragAndDrop()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @mirao @EgorBodnar fixing for backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @mirao @EgorBodnar fixing for backward compatibility.
great! Looks good
An additional flag would be more intuitive for users, but your solution is more elegant.
Motivation/Description of the PR
Applicable helpers:
Type of change
Checklist:
npm run docs
)npm run lint
)npm test
)