diff --git a/test/automation/src/sql/configurePythonDialog.ts b/test/automation/src/sql/configurePythonDialog.ts index ee19b27bb2..9feb8e3982 100644 --- a/test/automation/src/sql/configurePythonDialog.ts +++ b/test/automation/src/sql/configurePythonDialog.ts @@ -33,7 +33,13 @@ export class ConfigurePythonDialog extends Dialog { await this.code.waitForElement(installButton); await this.code.dispatchKeybinding('enter'); - return this.waitForDialogGone(); + await this.waitForDialogGone(); + return this._waitForInstallationComplete(); + } + + private async _waitForInstallationComplete(): Promise { + const installationCompleteNotification = '.notifications-toasts div[aria-label="Notebook dependencies installation is complete, source: Notebook Core Extensions (Extension), notification"]'; + await this.code.waitForElement(installationCompleteNotification); } } diff --git a/test/automation/src/sql/notebook.ts b/test/automation/src/sql/notebook.ts index 069460b059..5935f8ed32 100644 --- a/test/automation/src/sql/notebook.ts +++ b/test/automation/src/sql/notebook.ts @@ -46,6 +46,10 @@ export class Notebook { await this.toolbar.changeKernel(kernel); } + async waitForKernel(kernel: string): Promise { + await this.toolbar.waitForKernel(kernel); + } + async runActiveCell(): Promise { await this.code.dispatchKeybinding('F5'); } @@ -86,4 +90,9 @@ export class NotebookToolbar { await this.code.waitForSetValue(kernelDropdown, kernel); await this.code.dispatchKeybinding('enter'); } + + async waitForKernel(kernel: string): Promise { + const kernelDropdownValue = `${NotebookToolbar.toolbarSelector} select[id="kernel-dropdown"][title="${kernel}"]`; + await this.code.waitForElement(kernelDropdownValue); + } } diff --git a/test/smoke/src/sql/areas/notebook/notebook.test.ts b/test/smoke/src/sql/areas/notebook/notebook.test.ts index ebdf748aba..3f88f521ad 100644 --- a/test/smoke/src/sql/areas/notebook/notebook.test.ts +++ b/test/smoke/src/sql/areas/notebook/notebook.test.ts @@ -18,6 +18,7 @@ export function setup() { await app.workbench.sqlNotebook.changeKernel('Python 3'); await app.workbench.configurePythonDialog.waitForConfigurePythonDialog(); await app.workbench.configurePythonDialog.installPython(); + await app.workbench.sqlNotebook.waitForKernel('Python 3'); await app.workbench.sqlNotebook.runActiveCell(); await app.workbench.sqlNotebook.waitForResults();