From d87965775ab744f00db0314cb403ccc532e761e2 Mon Sep 17 00:00:00 2001 From: Alex Plate Date: Thu, 8 Feb 2024 16:48:03 +0200 Subject: [PATCH] Update version of robot --- gradle.properties | 2 +- .../ij-ui-tests/src/test/kotlin/ui/UiTests.kt | 20 +------------------ 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/gradle.properties b/gradle.properties index 86edc529e9..297de38765 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ downloadIdeaSources=true instrumentPluginCode=true version=SNAPSHOT javaVersion=17 -remoteRobotVersion=0.11.21 +remoteRobotVersion=0.11.22 antlrVersion=4.10.1 diff --git a/tests/ij-ui-tests/src/test/kotlin/ui/UiTests.kt b/tests/ij-ui-tests/src/test/kotlin/ui/UiTests.kt index 045e15644c..b6d8583e2a 100644 --- a/tests/ij-ui-tests/src/test/kotlin/ui/UiTests.kt +++ b/tests/ij-ui-tests/src/test/kotlin/ui/UiTests.kt @@ -240,7 +240,7 @@ class UiTests { step("Create $fileName file") { with(projectViewTree) { setExpandTimeout(30_000) - myExpand(projectName, "src") + expand(projectName, "src") findText("src").click(MouseButton.RIGHT_BUTTON) } remoteRobot.actionMenu("New").click() @@ -249,24 +249,6 @@ class UiTests { } } - // This is a replacement of a standard `expand` function. The only change is that it has increased time in - // `blockingGet(30_000)` - // This should be replaced with a standard `expand` once the release with the following fix will be available: - // https://github.com/JetBrains/intellij-ui-test-robot/pull/392 - private fun IdeaFrame.myExpand(vararg path: String) { - runJs( - """ - const expandingPathNodes = [${path.joinToString(",") { "\"${it}\"" }}] - const ignoreRoot = component.isRootVisible() === false - const treePath = com.intellij.ui.tree.TreePathUtil.convertArrayToTreePath(expandingPathNodes) - const toStringConverter = function(obj) {return java.util.Objects.toString(obj)} - const visitor = new com.intellij.ui.tree.TreeVisitor.ByTreePath(ignoreRoot, treePath, toStringConverter); - - com.intellij.util.ui.tree.TreeUtil.promiseExpand(component, visitor).blockingGet(30_000) - """ - ) - } - private fun IdeaFrame.reenableIdeaVim(editor: Editor) { println("Run reenableIdeaVim...") toggleIdeaVim()