From c8bc479b2310489e85e7a7ebd134a9d495b5e57a Mon Sep 17 00:00:00 2001 From: Nikolay Egorov Date: Tue, 14 Oct 2025 11:55:09 +0300 Subject: [PATCH] [KTNB] Address a failing UI table test by waiting for indexes to be updated, as only after UI table components are updated (cherry picked from commit 06374bb8cf22fd98a0bfc71046232b2e05f085a2) GitOrigin-RevId: a3fc181415c837c50dda38eff102de4ad28d95a2 --- .../components/notebooks/NotebookEditorComponent.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/notebooks/NotebookEditorComponent.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/notebooks/NotebookEditorComponent.kt index b1ebbc628ad0..b3d2bab739b3 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/notebooks/NotebookEditorComponent.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/notebooks/NotebookEditorComponent.kt @@ -29,6 +29,7 @@ import com.intellij.driver.sdk.ui.ui import com.intellij.driver.sdk.wait import com.intellij.driver.sdk.waitFor import com.intellij.driver.sdk.waitForCodeAnalysis +import com.intellij.driver.sdk.waitForIndicators import org.intellij.lang.annotations.Language import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds @@ -200,6 +201,16 @@ class NotebookEditorUiComponent(private val data: ComponentData) : JEditorUiComp } } + /** + * Combined action that runs all cells, wait for their execution, and waits for the indexes to update. + */ + fun runAllCellsAndWaitIndexesUpdated(timeout: Duration = 1.minutes, indicatorsTimeout: Duration = timeout): Unit = step("Executing cells and wait for indexes") { + runAllCellsAndWaitExecuted(timeout) + step("Waiting for indicators after execution") { + driver.waitForIndicators(indicatorsTimeout) + } + } + /* This functions should be removed when fixed: PY-84369