ui-tests: add clickItem to the test output

GitOrigin-RevId: 27720f55a07388629e4b62c7a0f835e3d15a2ef1
This commit is contained in:
Anastasia Katsman
2024-04-10 22:50:36 +00:00
committed by intellij-monorepo-bot
parent ecdbdf5699
commit 0a9b00ac2f
@@ -20,7 +20,7 @@ class JListUiComponent(data: ComponentData) : UiComponent(data) {
fun clickItem(itemText: String, fullMatch: Boolean = true) {
findItemIndex(itemText, fullMatch)?.let {
fixture.clickItemAtIndex(it)
} ?: throw IllegalArgumentException("item with text $itemText not found")
} ?: throw IllegalArgumentException("item with text $itemText not found, all items: ${items.joinToString(", ")}")
}
private fun findItemIndex(itemText: String, fullMatch: Boolean): Int? =