Skip to content

Commit

Permalink
Update version of robot
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPl292 committed Feb 8, 2024
1 parent 8c6f81a commit d879657
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ downloadIdeaSources=true
instrumentPluginCode=true
version=SNAPSHOT
javaVersion=17
remoteRobotVersion=0.11.21
remoteRobotVersion=0.11.22
antlrVersion=4.10.1


Expand Down
20 changes: 1 addition & 19 deletions tests/ij-ui-tests/src/test/kotlin/ui/UiTests.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit d879657

Please sign in to comment.