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