mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rdct] IJPL-183262: Do not Expand All
Some test runs have been failed due to expanding timeout. This commit changes the way how the logical tab selection check works from expanding all to expanding only a necessary path GitOrigin-RevId: 0393fcf37f028f3b9e88cb7dae31b225b333f646
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b913b727e8
commit
71ebfc4c2f
+9
@@ -9,6 +9,7 @@ import com.intellij.driver.sdk.ui.components.elements.ActionButtonUi
|
||||
import com.intellij.driver.sdk.ui.components.elements.JTreeUiComponent
|
||||
import com.intellij.driver.sdk.ui.components.elements.tree
|
||||
import com.intellij.driver.sdk.ui.rdTarget
|
||||
import com.intellij.driver.sdk.wait
|
||||
import org.intellij.lang.annotations.Language
|
||||
import java.awt.Point
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
@@ -32,6 +33,14 @@ class StructureToolWindowUi(data: ComponentData) : UiComponent(data) {
|
||||
waitForText?.let { structureTree.waitAnyTexts(message = message, timeout = 10.seconds, predicate = it) }
|
||||
return structureTree
|
||||
}
|
||||
fun waitExpandedAndGetStructureTree(message: String? = null, expandPath: List<String>? = null, waitForText: ((UiText) -> Boolean)? = null): JTreeUiComponent {
|
||||
val structureTree = structureTree.waitFound(10.seconds)
|
||||
expandPath?.toTypedArray()?.let {
|
||||
structureTree.expandPath(*it)
|
||||
}
|
||||
waitForText?.let { structureTree.waitAnyTexts(message = message, timeout = 10.seconds, predicate = it) }
|
||||
return structureTree
|
||||
}
|
||||
|
||||
private val structureTree
|
||||
get() = tree().apply { replaceCellRendererReader(driver.new(AccessibleNameCellRendererReader::class, rdTarget = component.rdTarget)) }
|
||||
|
||||
Reference in New Issue
Block a user