mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[jupyter-ui-tests] Add test for drag and drop
GitOrigin-RevId: df97d25d71ed52aea1b4fff42242e2791216e3f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e1e58bdd81
commit
097b9cef61
+11
@@ -375,6 +375,17 @@ internal class SmoothRobot @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
fun moveMouseAndPress(component: Component, where: Point?) {
|
||||
if (where != null) {
|
||||
moveMouse(component, where)
|
||||
}
|
||||
else {
|
||||
moveMouse(component)
|
||||
}
|
||||
ApplicationManager.getApplication().invokeAndWait({}, ModalityState.any())
|
||||
basicRobot.pressMouse(MouseButton.LEFT_BUTTON)
|
||||
}
|
||||
|
||||
private fun moveMouseWithAttempts(c: Component, x: Int, y: Int, attempts: Int = 3) {
|
||||
waitFor(Duration.ofSeconds(5), Duration.ofSeconds(1)) { performOnEdt { c.isShowing }!! }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user