From 53caa81e0e838ac2b74d762b36f13d55525a47b3 Mon Sep 17 00:00:00 2001 From: Anastasia Katsman Date: Wed, 4 Dec 2024 19:17:55 +0100 Subject: [PATCH] [rdct-tests] handleCheckBoxWithFileName: minor polishes GitOrigin-RevId: 448431b71c7586360bbd1e0a4aefc18aed4ac441 --- .../remotedriver/fixtures/JChangesListViewFixture.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/fixtures/JChangesListViewFixture.kt b/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/fixtures/JChangesListViewFixture.kt index 488419bc2d60..7745485a59a1 100644 --- a/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/fixtures/JChangesListViewFixture.kt +++ b/plugins/performanceTesting/remote-driver/src/com/jetbrains/performancePlugin/remotedriver/fixtures/JChangesListViewFixture.kt @@ -23,16 +23,16 @@ class JChangesListViewFixture(private val robot: Robot, private val component: J private fun handleCheckBoxWithFileName(fileName: String, setEnabled: Boolean) { val root = component.model.root as DefaultMutableTreeNode - val node = TreeUtil.findNode(root) { it.toString().contains(fileName) } + val node = TreeUtil.findNode(root) { it.toString().contains(fileName) } ?: error("Node with name containing $fileName is not found") - val fileTreePath = TreePath(node!!.path) + val fileTreePath = TreePath(node.path) val checkbox = getCheckBoxForNode(node, fileTreePath) if (checkbox.isSelected != setEnabled) { - val fileTrePathLocation = computeOnEdt { + val fileTreePathLocation = computeOnEdt { component.getPathBounds(fileTreePath) ?: error("Have not found bounds") } - clickOnCheckbox(checkbox, fileTrePathLocation) + clickOnCheckbox(checkbox, fileTreePathLocation) } }