From 628fcfc94a0c4c369c3d107bf1907bfa2cf5ee80 Mon Sep 17 00:00:00 2001 From: Artem Gainanov Date: Fri, 30 Mar 2018 13:06:31 +0700 Subject: [PATCH] [gui-test] GUI-83 separate getPath and clickPath --- .../fixtures/extended/ExtendedTreeFixture.kt | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt index 0b17d623d103..f3170bff979c 100644 --- a/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt +++ b/platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/extended/ExtendedTreeFixture.kt @@ -144,13 +144,7 @@ open class ExtendedTreeFixture(val robot: Robot, val tree: JTree) : JTreeFixture return result } - /** - * Find full path of the given node and click - * Works fine for test tool window and settings - * Works incorrect for npm/gulp.grunt tool windows - * @param node - node full name - */ - fun clickPathByNode(node: String) { + fun getPathByNode(node: String): List { expandNodes() Pause.pause(1000) //Wait for EDT thread to finish expanding val result: MutableList = mutableListOf() @@ -174,7 +168,17 @@ open class ExtendedTreeFixture(val robot: Robot, val tree: JTree) : JTreeFixture }else if (tree.model.root.toString() == ""){ result.removeAt(0) } - clickPath(result) + return result + } + + /** + * Find full path of the given node and click + * Works fine for test tool window and settings + * Works incorrect for npm/gulp.grunt tool windows + * @param node - node full name + */ + fun clickPathByNode(node: String) { + clickPath(getPathByNode(node)) } /**