Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork158
feat(web): AddDrag interaction#2583
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
jan-molak commentedOct 13, 2024
Great work,@TurekBot! I love that you've written the API docs too, much appreciated 🙇🏻 One suggestion: three integration tests in Other than that I think this PR is good to go! |
Uh oh!
There was an error while loading.Please reload this page.
I borrowed the drag and drop example html from MDN. Conveniently, it logs all the drag events.Related tickets:serenity-js#2132
Once implemented, this will allow you to drag elements to other elements.Related tickets:serenity-js#2132
I based it loosely off the `Switch` interactionRelated tickets:serenity-js#2132
I have no experience with Protractor. However, this implementation is pretty close to the one Jan suggested inserenity-js#177, so maybe I got it right? Who knows.
I have no experience with WebdriverIO. However, other people in the bug ticketwebdriverio/webdriverio#8022, say this works, so maybe it does?
8e8a1e1 to299ddb5CompareTurekBot commentedOct 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I rebased my branch onto the upstream main and then removed the semi-colon and updated the invocation locations. We'll see if the tests pass. (I also dropped the package-lock changes that gitpod added just from opening gitpod. Hopefully, that doesn't cause any problems.) |
Also check for the drag events that get output in this specific example.Refs:https://github.com/serenity-js/serenity-js/actions/runs/11537779951/job/32115590925?pr=2583#step:8:3282
TurekBot commentedOct 27, 2024
After trying a few things and looking at myoriginal test run, it seems my Protractor 🤔 |
TurekBot commentedOct 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Well, I'm not sure what's up—but I found some clues. In the protractor dragAndDrop API reference, itsays
And that issue seems to be a duplicate ofthis one that's still open that could be the culprit. It's mindboggling to me that this bug could still exist in Chromedriver... Are people just not dragging and dropping things? Haha. There'sa monkeypatch that might unstick things. 🤷♂️ But I'm also curious if doing a workaroundlike our Webdriverio implementation does could work. CC:@jan-molak (in case you didn't already get a notification). |
jan-molak commentedNov 3, 2024
Hey@TurekBot and apologies for the late reply, I was on holiday with limited access to the Internet.
Wow, this bug is 10 years old...
The monkey patch seems pretty clever, but it's also 9 years old... I wonder if it still works 🤔
Would you mind checking? It feels like using the standard Webdriver action APIs should be a more stable solution than relying on patching the browser. Also, thanks a million for investigating how to make drag'n'drop work consistently across all the drivers! |
jan-molak commentedNov 16, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hey@TurekBot - I noticed that ChromeDriver 130 no longer supports certain Protractor/Selenium 3 APIs (see#2612) Please give me a shout if you'd like any help with this PR. |
Background
Jan was very gracious and told me precisely how I could accomplish this in#2132, and so despite my lack of experience with Typescript, Protractor, and WebdriverIO, I tried to add a
Draginteraction.Where it's at
I think it's close, but I'm not sure it's there yet.@jan-molak, if you have some time, please feel free to take a look.
At least one problem
In the gitpod, I tried running
npm run test, but it's upset about something with Protractor. Here's the error it's giving me.