(
interactiveWindow: IInteractiveWindow
)
| 207 | } |
| 208 | |
| 209 | export async function waitForInteractiveWindow( |
| 210 | interactiveWindow: IInteractiveWindow |
| 211 | ): Promise<vscode.NotebookDocument> { |
| 212 | let notebookDocument: vscode.NotebookDocument | undefined; |
| 213 | await waitForCondition( |
| 214 | async () => { |
| 215 | notebookDocument = vscode.workspace.notebookDocuments.find( |
| 216 | (doc) => doc.uri.toString() === interactiveWindow?.notebookUri?.toString() |
| 217 | ); |
| 218 | let inputBox = vscode.window.visibleTextEditors.find( |
| 219 | (e) => e.document.uri.path === interactiveWindow?.inputUri?.path |
| 220 | ); |
| 221 | logger.debug( |
| 222 | `Waiting for Interactive Window '${interactiveWindow.notebookUri?.toString()}',`, |
| 223 | `found notebook '${notebookDocument?.uri.toString()}' and input '${inputBox?.document.uri.toString()}'` |
| 224 | ); |
| 225 | return !!notebookDocument && !!inputBox; |
| 226 | }, |
| 227 | defaultNotebookTestTimeout, |
| 228 | 'Interactive window notebook document not found' |
| 229 | ); |
| 230 | |
| 231 | return notebookDocument!; |
| 232 | } |
| 233 | |
| 234 | export async function runInteractiveWindowInput( |
| 235 | code: string, |
no test coverage detected