From 326a720f9fd47e37bcdad741ce59188c0051955f Mon Sep 17 00:00:00 2001 From: Daniil Stankevych Date: Sun, 16 Nov 2025 01:24:06 +0200 Subject: [PATCH] [jupyter-ui-tests] PY-82390 add `outputs preserve after reopening` test to Mono and RemDev flaky package GitOrigin-RevId: 10c67e0e5621787ada2272e0c33902ccf8862cea --- .../notebooks/NotebookEditorComponent.kt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 591655b95e77..7fd41bb9959b 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 @@ -98,6 +98,8 @@ class NotebookEditorUiComponent(private val data: ComponentData) : JEditorUiComp ) val imagePanel: List get() = xx("//div[@class='FullEditorWidthRenderer']//div[@class='ImagePanel']").list() + val firstNotebookOutput: String + get() = notebookCellOutputs.first().getAllTexts().asString() val lastNotebookOutput: String get() = notebookCellOutputs.last().getAllTexts().asString() val statusBar: UiComponent @@ -427,4 +429,14 @@ fun Driver.withNotebookEditor(testBody: NotebookEditorUiComponent.() -> Unit): I } } - +fun Driver.openFileWithProjectPanel(fileName: String) = ideFrame { + leftToolWindowToolbar.projectButton.open() + projectView { + projectViewTree.run { + waitOneText(fileName).doubleClick() + } + } + waitFor("the editor is present", timeout = 30.seconds) { + editor().present() + } +} \ No newline at end of file