Page MenuHomePhabricator

Cannot write browser tests for OO.ui.mixin.DraggableElement
Closed, InvalidPublic

Description

In the course of testing T247957: Add drag and drop functionality to the resolution suggestion, I discovered that webdriver's dragAndDrop function doesn't play nicely with chromedriver and an oojs draggable group. I've tried:

  • wdio v4 browser.dragAndDrop
  • Upgrading to wdio v5 and v6
  • Element#dragAndDrop
  • Bare protocol via performActions: buttonDown, moveTo, buttonUp.
  • browser.touchAction: press, moveTo, release
  • html-dnd pure HTML drag emulation

I'm running out of things to try, next I might customize html-dnd...

Is there any precedent for testing these widgets?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 584626 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/TwoColConflict@master] [WIP] Browser tests for draggable talk page blocks

https://gerrit.wikimedia.org/r/584626

Did you try updating to webdriverio v6 (T247254)? There's some drag/drop improvements.

Announcement: https://webdriver.io/blog/2020/03/26/webdriverio-v6-released.html

Updating to v6 should be way easier than to v5, at least that's what the announcement says. 😁

Did you try updating to webdriverio v6 (T247254)? There's some drag/drop improvements.

Thanks, this was totally worth trying. I upgraded and nothing changed, unfortunately.

My guess is that the way webdriver's drag-and-drop works is incompatible with oojs-ui, maybe because elements are detached from the DOM and reattached, or perhaps the buttonDown grabs the wrong element...

Pppery removed a project: Patch-For-Review.
Pppery subscribed.

Per parent task.