[driver][ui-tests] add state getter method for TreePathToRowListWithCheckboxStateList

GitOrigin-RevId: 638f5553985c103e80b8a834b2dadb6edcb1cd56
This commit is contained in:
Lev Zagnetin
2024-04-27 00:59:55 +03:00
committed by intellij-monorepo-bot
parent cce8ea060d
commit 677c71d0f8

View File

@@ -14,4 +14,12 @@ class TreePathToRowListWithCheckboxState(path: List<String>, row: Int, val check
}
}
class TreePathToRowListWithCheckboxStateList : ArrayList<TreePathToRowListWithCheckboxState>(), Serializable, PassByValue
class TreePathToRowListWithCheckboxStateList : ArrayList<TreePathToRowListWithCheckboxState>(), Serializable, PassByValue {
fun getCheckboxStateByPath(path: List<String>): Boolean {
val checkbox = this.firstOrNull { it.path.equals(path) }
if (checkbox == null) {
throw IllegalStateException("Can't find checkbox with path: $path")
}
return checkbox.checkboxState
}
}