From bdef2c2a7381e736a73222bb212f2c3d1ea161c5 Mon Sep 17 00:00:00 2001 From: Ilya Muradyan Date: Sun, 1 Jun 2025 02:26:48 +0200 Subject: [PATCH] KTNB: Try to stabilize tests GitOrigin-RevId: 986ff6762e3e03217315683c79a35332356650ca --- .../sdk/ui/components/kotlin/NotebookEditorComponent.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/kotlin/NotebookEditorComponent.kt b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/kotlin/NotebookEditorComponent.kt index 5fbb66190a1a..7f99ce4057c8 100644 --- a/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/kotlin/NotebookEditorComponent.kt +++ b/platform/remote-driver/test-sdk/src/com/intellij/driver/sdk/ui/components/kotlin/NotebookEditorComponent.kt @@ -17,6 +17,7 @@ import com.intellij.driver.sdk.ui.ui import com.intellij.driver.sdk.waitFor import org.intellij.lang.annotations.Language import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds /** @@ -103,10 +104,14 @@ class NotebookEditorUiComponent(private val data: ComponentData) : JEditorUiComp cell.click() } - fun typeInCell(cellSelector: CellSelector, text: String) { + fun typeInCell( + cellSelector: CellSelector, + text: String, + delayBetweenChars: Duration = 50.milliseconds, + ) { clickOnCell(cellSelector) keyboard { - typeText(text) + typeText(text, delayBetweenChars.inWholeMilliseconds) } }