From 56837680a05a1edf1abed714e5a2d343b5392603 Mon Sep 17 00:00:00 2001 From: misha-db Date: Mon, 16 Mar 2026 20:02:42 +0400 Subject: [PATCH 01/14] [WIP] Fix e2e tests --- packages/databricks-vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/databricks-vscode/package.json b/packages/databricks-vscode/package.json index 52b6166a3..7185ab8fe 100644 --- a/packages/databricks-vscode/package.json +++ b/packages/databricks-vscode/package.json @@ -6,7 +6,7 @@ "license": "LicenseRef-LICENSE", "version": "2.10.5", "engines": { - "vscode": "^1.101.0", + "vscode": "^1.86.0", "node": ">=22.0" }, "categories": [ From 43ff794d228e988dab207472e09844f00140702c Mon Sep 17 00:00:00 2001 From: misha-db Date: Mon, 16 Mar 2026 20:47:22 +0400 Subject: [PATCH 02/14] Revert "[WIP] Fix e2e tests (#1812)" This reverts commit f468d9f978e1ffaa6e30c3d627eebed69e745e8b. --- .../src/test/e2e/auth.e2e.ts | 7 +-- .../src/test/e2e/deploy_and_run_job.e2e.ts | 7 +-- .../test/e2e/deploy_and_run_pipeline.e2e.ts | 9 +-- .../src/test/e2e/destroy.e2e.ts | 58 ++++++++++++------ ...esh_resource_explorer_on_yml_change.e2e.ts | 4 +- .../src/test/e2e/run_dbconnect.ucws.e2e.ts | 10 +-- .../src/test/e2e/run_files.e2e.ts | 14 +---- .../src/test/e2e/utils/commonUtils.ts | 61 ++++++------------- .../src/test/e2e/wdio.conf.ts | 2 +- 9 files changed, 69 insertions(+), 103 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/auth.e2e.ts b/packages/databricks-vscode/src/test/e2e/auth.e2e.ts index 4ada3295c..ae2fbe47e 100644 --- a/packages/databricks-vscode/src/test/e2e/auth.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/auth.e2e.ts @@ -1,7 +1,6 @@ import assert from "node:assert"; import { dismissNotifications, - getActionButton, waitForInput, getViewSection, waitForLogin, @@ -71,12 +70,8 @@ describe("Configure Databricks Extension", async function () { const items = await section.getVisibleItems(); for (const item of items) { const label = await item.getLabel(); - console.log( - "Looking for signin button, got item:", - await (await item.elem).getHTML() - ); if (label.toLowerCase().includes("auth type")) { - return getActionButton(item, "Sign in"); + return item.getActionButton("Sign in"); } } }, diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_job.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_job.e2e.ts index c5d335c63..e4d9399d8 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_job.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_job.e2e.ts @@ -1,10 +1,8 @@ import assert from "node:assert"; import { dismissNotifications, - getActionButton, getUniqueResourceName, getViewSection, - selectOutputChannel, waitForDeployment, waitForLogin, waitForTreeItems, @@ -67,7 +65,7 @@ describe("Deploy and run job", async function () { it("should deploy and run the current job", async () => { const outputView = await workbench.getBottomBar().openOutputView(); - await selectOutputChannel(outputView, "Databricks Bundle Logs"); + await outputView.selectChannel("Databricks Bundle Logs"); await outputView.clearText(); const jobItem = await getResourceViewItem( @@ -77,8 +75,7 @@ describe("Deploy and run job", async function () { ); assert(jobItem, `Job ${jobName} not found in resource explorer`); - const deployAndRunButton = await getActionButton( - jobItem, + const deployAndRunButton = await jobItem.getActionButton( "Deploy the bundle and run the job" ); assert(deployAndRunButton, "Deploy and run button not found"); diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts index 8e9750279..04453956d 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts @@ -1,9 +1,7 @@ import assert from "node:assert"; import { dismissNotifications, - getActionButton, getViewSection, - selectOutputChannel, waitForDeployment, waitForLogin, waitForTreeItems, @@ -64,7 +62,7 @@ describe("Deploy and run pipeline", async function () { it("should deploy and run the current pipeline", async () => { const outputView = await workbench.getBottomBar().openOutputView(); - await selectOutputChannel(outputView, "Databricks Bundle Logs"); + await outputView.selectChannel("Databricks Bundle Logs"); await outputView.clearText(); const pipelineItem = await getResourceViewItem( @@ -77,14 +75,13 @@ describe("Deploy and run pipeline", async function () { `Pipeline ${pipelineName} not found in resource explorer` ); - const deployAndRunButton = await getActionButton( - pipelineItem, + const deployAndRunButton = await pipelineItem.getActionButton( "Deploy the bundle and run the pipeline" ); assert(deployAndRunButton, "Deploy and run button not found"); await deployAndRunButton.elem.click(); - await waitForDeployment(outputView); + await waitForDeployment(); await waitForRunStatus( resourceExplorerView, diff --git a/packages/databricks-vscode/src/test/e2e/destroy.e2e.ts b/packages/databricks-vscode/src/test/e2e/destroy.e2e.ts index e26245e42..a6452b35e 100644 --- a/packages/databricks-vscode/src/test/e2e/destroy.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/destroy.e2e.ts @@ -3,7 +3,6 @@ import { dismissNotifications, getUniqueResourceName, getViewSection, - selectOutputChannel, waitForLogin, waitForTreeItems, } from "./utils/commonUtils.ts"; @@ -72,25 +71,35 @@ describe("Deploy and destroy", async function () { .replaceAll(/[^a-zA-Z0-9]/g, "_")}]`; const outputView = await workbench.getBottomBar().openOutputView(); - await selectOutputChannel(outputView, "Databricks Bundle Logs"); + await outputView.selectChannel("Databricks Bundle Logs"); await outputView.clearText(); await browser.executeWorkbench(async (vscode) => { await vscode.commands.executeCommand("databricks.bundle.deploy"); }); - - await browser.executeWorkbench(async (vscode) => { - await vscode.commands.executeCommand( - "workbench.panel.output.focus" - ); - }); - - await selectOutputChannel(outputView, "Databricks Bundle Logs"); - console.log("Waiting for deployment to finish"); + // Wait for the deployment to finish await browser.waitUntil( async () => { try { + await browser.executeWorkbench(async (vscode) => { + await vscode.commands.executeCommand( + "workbench.panel.output.focus" + ); + }); + const outputView = await workbench + .getBottomBar() + .openOutputView(); + + if ( + (await outputView.getCurrentChannel()) !== + "Databricks Bundle Logs" + ) { + await outputView.selectChannel( + "Databricks Bundle Logs" + ); + } + const logs = (await outputView.getText()).join(""); console.log(logs); return ( @@ -98,7 +107,6 @@ describe("Deploy and destroy", async function () { logs.includes("Bundle configuration refreshed") ); } catch (e) { - console.log("Error waiting for deployment to finish:", e); return false; } }, @@ -127,19 +135,29 @@ describe("Deploy and destroy", async function () { ); }); - await browser.executeWorkbench(async (vscode) => { - await vscode.commands.executeCommand( - "workbench.panel.output.focus" - ); - }); - - await selectOutputChannel(outputView, "Databricks Bundle Logs"); - console.log("Waiting for bundle to destroy"); // Wait for status to reach success await browser.waitUntil( async () => { try { + await browser.executeWorkbench(async (vscode) => { + await vscode.commands.executeCommand( + "workbench.panel.output.focus" + ); + }); + const outputView = await workbench + .getBottomBar() + .openOutputView(); + + if ( + (await outputView.getCurrentChannel()) !== + "Databricks Bundle Logs" + ) { + await outputView.selectChannel( + "Databricks Bundle Logs" + ); + } + const logs = (await outputView.getText()).join(""); console.log(logs); return ( diff --git a/packages/databricks-vscode/src/test/e2e/refresh_resource_explorer_on_yml_change.e2e.ts b/packages/databricks-vscode/src/test/e2e/refresh_resource_explorer_on_yml_change.e2e.ts index 6898df2fd..553570fcd 100644 --- a/packages/databricks-vscode/src/test/e2e/refresh_resource_explorer_on_yml_change.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/refresh_resource_explorer_on_yml_change.e2e.ts @@ -3,7 +3,6 @@ import {CustomTreeSection} from "wdio-vscode-service"; import { dismissNotifications, getViewSection, - selectOutputChannel, waitForLogin, } from "./utils/commonUtils.ts"; import { @@ -79,8 +78,7 @@ describe("Automatically refresh resource explorer", async function () { const outputView = await (await browser.getWorkbench()) .getBottomBar() .openOutputView(); - - await selectOutputChannel(outputView, "Databricks Bundle Logs"); + await outputView.selectChannel("Databricks Bundle Logs"); const jobDef = await createProjectWithJob( projectName, diff --git a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts index 6b78d3d8a..a79fa18c2 100644 --- a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts @@ -198,15 +198,9 @@ describe("Run files on serverless compute", async function () { // Install dependencies from the requirements.txt const dependenciesInput = await waitForInput(); - try { - await dependenciesInput.toggleAllQuickPicks(true); - } catch (e) { - console.log( - "Failed to toggle all quick picks, moving on. Error:", - e - ); - } + await dependenciesInput.toggleAllQuickPicks(true); await dependenciesInput.confirm(); + await waitForNotification("The following environment is selected"); await waitForNotification("Databricks Connect", "Install"); diff --git a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts index eb1d1dced..b9eb2873b 100644 --- a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts @@ -51,22 +51,10 @@ describe("Run files", async function () { await executeCommandWhenAvailable("Databricks: Upload and Run File"); await browser.waitUntil(async () => { const notifications = await workbench.getNotifications(); - console.log("Notifications:", notifications.length); for (const notification of notifications) { const message = await notification.getMessage(); - console.log("Message:", message); if (message.includes("Uploading bundle assets")) { - const elements = await notification.actions$.$$( - notification.locators.action - ); - console.log("Elements:", elements.length); - for (const element of elements) { - const text = await element.getText(); - if (text === "Cancel") { - await element.click(); - break; - } - } + await notification.takeAction("Cancel"); return true; } } diff --git a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts index 3620a68df..6ef1b626c 100644 --- a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts +++ b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts @@ -6,8 +6,6 @@ import { ViewControl, ViewSection, InputBox, - OutputView, - TreeItem, } from "wdio-vscode-service"; // eslint-disable-next-line @typescript-eslint/naming-convention @@ -21,17 +19,6 @@ const ViewSectionTypes = [ ] as const; export type ViewSectionType = (typeof ViewSectionTypes)[number]; -export async function selectOutputChannel( - outputView: OutputView, - channelName: string -) { - if ((await outputView.getCurrentChannel()) === channelName) { - return; - } - outputView.locatorMap.BottomBarViews.outputChannels = `ul[aria-label="Output actions"] select`; - await outputView.selectChannel(channelName); -} - export async function findViewSection(name: ViewSectionType) { const workbench = await browser.getWorkbench(); @@ -54,14 +41,12 @@ export async function findViewSection(name: ViewSectionType) { ); const views = (await (await control?.openView())?.getContent()?.getSections()) ?? []; - console.log("Views:", views.length); for (const v of views) { - const title = await v.elem.getText(); - console.log("View title:", title); + const title = await v.getTitle(); if (title === null) { continue; } - if (title.toUpperCase().includes(name)) { + if (title.toUpperCase() === name) { return v; } } @@ -350,15 +335,28 @@ export async function waitForNotification(message: string, action?: string) { ); } -export async function waitForDeployment(outputView: OutputView) { +export async function waitForDeployment() { console.log("Waiting for deployment to finish"); - await browser.executeWorkbench(async (vscode) => { - await vscode.commands.executeCommand("workbench.panel.output.focus"); - }); - await selectOutputChannel(outputView, "Databricks Bundle Logs"); + const workbench = await driver.getWorkbench(); await browser.waitUntil( async () => { try { + await browser.executeWorkbench(async (vscode) => { + await vscode.commands.executeCommand( + "workbench.panel.output.focus" + ); + }); + const outputView = await workbench + .getBottomBar() + .openOutputView(); + + if ( + (await outputView.getCurrentChannel()) !== + "Databricks Bundle Logs" + ) { + await outputView.selectChannel("Databricks Bundle Logs"); + } + const logs = (await outputView.getText()).join(""); console.log("------------ Bundle Output ------------"); console.log(logs); @@ -378,22 +376,3 @@ export async function waitForDeployment(outputView: OutputView) { } ); } - -export async function getActionButton(item: TreeItem, label: string) { - const actions = await item.getActionButtons(); - if (actions.length > 0) { - for (const item of actions) { - console.log("Checking action button:", item.getLabel()); - console.log( - "Action button element:", - await (await item.elem).getHTML() - ); - const itemLabel = - item.getLabel() ?? (await item.elem.getAttribute("aria-label")); - if (itemLabel.indexOf(label) > -1) { - return item; - } - } - } - return undefined; -} diff --git a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts index 8d3365e49..0c87aee19 100644 --- a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts +++ b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts @@ -169,7 +169,7 @@ export const config: Options.Testrunner = { return [ { "browserName": "vscode", - "browserVersion": engines.vscode.replace(/\^/, ""), + "browserVersion": engines.vscode.replace("^", ""), "wdio:vscodeOptions": { extensionPath: path.resolve( __dirname, From 3ee7d3a7f17d4b462c28d0dd57f5a3c503b26c54 Mon Sep 17 00:00:00 2001 From: misha-db Date: Mon, 16 Mar 2026 22:57:13 +0400 Subject: [PATCH 03/14] Add logging --- .../src/test/e2e/deploy_and_run_pipeline.e2e.ts | 3 +++ .../src/test/e2e/run_dbconnect.ucws.e2e.ts | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts index 04453956d..f6755ddd5 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts @@ -106,6 +106,7 @@ describe("Deploy and run pipeline", async function () { console.log(`Run status item: ${label}`); labels.push(label); } + console.log(`Labels: ${labels}`); assert(labels.includes("Start Time"), "Start Time label not found"); assert( labels.includes("Dataset 'test_view' defined as VIEW.") || @@ -143,6 +144,7 @@ describe("Deploy and run pipeline", async function () { datasets.push({label, description, item}); } datasets.sort((a, b) => (a.label > b.label ? 1 : -1)); + console.log(`Datasets: ${datasets}`); assert.strictEqual(datasets.length, 2); assert.strictEqual(datasets[0].label, "test_table"); assert.strictEqual(datasets[0].description, "materialized view"); @@ -158,6 +160,7 @@ describe("Deploy and run pipeline", async function () { "Datasets", "test_table" ); + console.log(`Items: ${schemaItems}`); assert.strictEqual(schemaItems.length, 1); assert.strictEqual(await schemaItems[0].getLabel(), "1"); assert.strictEqual(await schemaItems[0].getDescription(), "integer"); diff --git a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts index a79fa18c2..b80dbc5b4 100644 --- a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts @@ -198,7 +198,14 @@ describe("Run files on serverless compute", async function () { // Install dependencies from the requirements.txt const dependenciesInput = await waitForInput(); - await dependenciesInput.toggleAllQuickPicks(true); + try { + await dependenciesInput.toggleAllQuickPicks(true); + } catch (e) { + console.log( + "Failed to toggle all quick picks, moving on. Error:", + e + ); + } await dependenciesInput.confirm(); await waitForNotification("The following environment is selected"); From 9eae14379d6e0aa8231f49bc99a7afbd1f4353b0 Mon Sep 17 00:00:00 2001 From: misha-db Date: Mon, 16 Mar 2026 23:36:55 +0400 Subject: [PATCH 04/14] Update deploy_and_run_pipeline.e2e.ts --- .../src/test/e2e/deploy_and_run_pipeline.e2e.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts index f6755ddd5..299917538 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts @@ -106,7 +106,6 @@ describe("Deploy and run pipeline", async function () { console.log(`Run status item: ${label}`); labels.push(label); } - console.log(`Labels: ${labels}`); assert(labels.includes("Start Time"), "Start Time label not found"); assert( labels.includes("Dataset 'test_view' defined as VIEW.") || @@ -118,7 +117,7 @@ describe("Deploy and run pipeline", async function () { "Dataset 'test_table' defined as MATERIALIZED_VIEW." ) || labels.includes( - "Dataset `test_table` defined as MATERIALIZED_VIEW." + "Dataset `vscode_integration_test`.`test_table` defined as MATERIALIZED_VIEW." ), "test_table item not found" ); @@ -144,9 +143,12 @@ describe("Deploy and run pipeline", async function () { datasets.push({label, description, item}); } datasets.sort((a, b) => (a.label > b.label ? 1 : -1)); - console.log(`Datasets: ${datasets}`); + assert.strictEqual(datasets.length, 2); - assert.strictEqual(datasets[0].label, "test_table"); + assert.strictEqual( + datasets[0].label, + "vscode_integration_test.test_table" + ); assert.strictEqual(datasets[0].description, "materialized view"); assert.strictEqual(datasets[1].label, "test_view"); assert.strictEqual(datasets[1].description, "view"); @@ -158,7 +160,7 @@ describe("Deploy and run pipeline", async function () { "Pipelines", pipelineName, "Datasets", - "test_table" + "vscode_integration_test.test_table" ); console.log(`Items: ${schemaItems}`); assert.strictEqual(schemaItems.length, 1); From 960bb6d16eff2b19f142c788d79744d8733a6c07 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 00:57:03 +0400 Subject: [PATCH 05/14] Update deploy_and_run_pipeline.e2e.ts --- .../src/test/e2e/deploy_and_run_pipeline.e2e.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts index 299917538..8caaea238 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts @@ -145,13 +145,13 @@ describe("Deploy and run pipeline", async function () { datasets.sort((a, b) => (a.label > b.label ? 1 : -1)); assert.strictEqual(datasets.length, 2); + assert.strictEqual(datasets[0].label, "test_view"); + assert.strictEqual(datasets[0].description, "view"); assert.strictEqual( - datasets[0].label, + datasets[1].label, "vscode_integration_test.test_table" ); - assert.strictEqual(datasets[0].description, "materialized view"); - assert.strictEqual(datasets[1].label, "test_view"); - assert.strictEqual(datasets[1].description, "view"); + assert.strictEqual(datasets[1].description, "materialized view"); }); it("should show expected schema definitions for a dataset", async () => { @@ -162,7 +162,6 @@ describe("Deploy and run pipeline", async function () { "Datasets", "vscode_integration_test.test_table" ); - console.log(`Items: ${schemaItems}`); assert.strictEqual(schemaItems.length, 1); assert.strictEqual(await schemaItems[0].getLabel(), "1"); assert.strictEqual(await schemaItems[0].getDescription(), "integer"); From 232c5e9e893149f60f64e947180341cdb3ba79f3 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 01:26:37 +0400 Subject: [PATCH 06/14] Update deploy_and_run_pipeline.e2e.ts --- .../src/test/e2e/deploy_and_run_pipeline.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts index 8caaea238..5920d5d71 100644 --- a/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/deploy_and_run_pipeline.e2e.ts @@ -151,7 +151,7 @@ describe("Deploy and run pipeline", async function () { datasets[1].label, "vscode_integration_test.test_table" ); - assert.strictEqual(datasets[1].description, "materialized view"); + assert.strictEqual(datasets[1].description, ""); }); it("should show expected schema definitions for a dataset", async () => { From 2c326943603672a9ec6946709afd526e00902405 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 13:11:26 +0400 Subject: [PATCH 07/14] Update commonUtils.ts --- packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts index 6ef1b626c..3865032ac 100644 --- a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts +++ b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts @@ -42,11 +42,12 @@ export async function findViewSection(name: ViewSectionType) { const views = (await (await control?.openView())?.getContent()?.getSections()) ?? []; for (const v of views) { - const title = await v.getTitle(); + const title = await v.elem.getTitle(); + console.log("View title:", title); if (title === null) { continue; } - if (title.toUpperCase() === name) { + if (title.toUpperCase().includes(name)) { return v; } } From 03fcbf46d8b77d56773037f63c0561adc79b3f44 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 13:27:36 +0400 Subject: [PATCH 08/14] Update commonUtils.ts --- packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts index 3865032ac..752e90edc 100644 --- a/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts +++ b/packages/databricks-vscode/src/test/e2e/utils/commonUtils.ts @@ -42,7 +42,7 @@ export async function findViewSection(name: ViewSectionType) { const views = (await (await control?.openView())?.getContent()?.getSections()) ?? []; for (const v of views) { - const title = await v.elem.getTitle(); + const title = await v.getTitle(); console.log("View title:", title); if (title === null) { continue; From e7fa3e8533f66450f8fd61a9ca5c7b984bfd3d87 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 15:02:58 +0400 Subject: [PATCH 09/14] Update run_dbconnect.ucws.e2e.ts --- .../databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts index b80dbc5b4..6cb296a9d 100644 --- a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts @@ -109,6 +109,7 @@ describe("Run files on serverless compute", async function () { "# MAGIC select 1 + 1;", "# MAGIC select 'hello run;'", "# COMMAND ----------", + `import os`, `df = _sqldf.toPandas()`, `df.to_json(os.path.join(os.getcwd(), "databricks-run-notebook-output.json"))`, ].join("\n") @@ -118,6 +119,7 @@ describe("Run files on serverless compute", async function () { path.join(nestedDir, "databricks-notebook.py"), [ "# Databricks notebook source", + `import os`, `spark.sql('SELECT "hello world"').show()`, "# COMMAND ----------", "# DBTITLE 1,My cell title", From 3a0cecf589d0086e50593a1e2373242a6577d564 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 16:22:12 +0400 Subject: [PATCH 10/14] Update run_files.e2e.ts --- packages/databricks-vscode/src/test/e2e/run_files.e2e.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts index b9eb2873b..3729431b7 100644 --- a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts @@ -51,8 +51,10 @@ describe("Run files", async function () { await executeCommandWhenAvailable("Databricks: Upload and Run File"); await browser.waitUntil(async () => { const notifications = await workbench.getNotifications(); + console.log("Notifications:", notifications.length); for (const notification of notifications) { const message = await notification.getMessage(); + console.log("Message:", message); if (message.includes("Uploading bundle assets")) { await notification.takeAction("Cancel"); return true; From 437fed4f88220955d8e27ad4be8ff6dd24694271 Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 17:38:03 +0400 Subject: [PATCH 11/14] Update run_dbconnect.ucws.e2e.ts --- .../databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts index 6cb296a9d..9ab8e503c 100644 --- a/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_dbconnect.ucws.e2e.ts @@ -23,7 +23,7 @@ async function checkOutputFile(path: string, expectedContent: string) { return fileContent.includes(expectedContent); }, { - timeout: 60_000, + timeout: 120_000, interval: 2000, timeoutMsg: `Output file "${path}" did not contain "${expectedContent}"`, } @@ -33,7 +33,7 @@ async function checkOutputFile(path: string, expectedContent: string) { describe("Run files on serverless compute", async function () { let projectDir: string; - this.timeout(3 * 60 * 1000); + this.timeout(6 * 60 * 1000); before(async () => { assert(process.env.WORKSPACE_PATH, "WORKSPACE_PATH doesn't exist"); From de83e77a18d56aef11b8882edda85e6c66798e06 Mon Sep 17 00:00:00 2001 From: Misha Kezherashvili Date: Tue, 17 Mar 2026 19:38:55 +0400 Subject: [PATCH 12/14] Update wdio.conf.ts --- .../src/test/e2e/wdio.conf.ts | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts index 0c87aee19..9d3538b9e 100644 --- a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts +++ b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts @@ -498,33 +498,33 @@ export const config: Options.Testrunner = { console.log("Starting cleanup"); console.log("Extensions dir:", EXTENSIONS_DIR); console.log("Workspace dir:", WORKSPACE_PATH); - const dbCli = path.join( - EXTENSIONS_DIR, - `${packageJson.publisher}.${packageJson.name}-${packageJson.version}`, - "bin", - "databricks" - ); - const subfolders = await fs.readdir(WORKSPACE_PATH, { - withFileTypes: true, - }); - for (const folder of subfolders) { - if (folder.isDirectory()) { - const folderPath = path.join(WORKSPACE_PATH, folder.name); - console.log(`Cleaning up ${folderPath}`); - try { - const res = await execFile( - dbCli, - ["bundle", "destroy", "--auto-approve", "--force-lock"], - {cwd: folderPath} - ); - console.log(`'bundle destroy' output:`); - console.log(res.stdout.trim()); - console.log(res.stderr.trim()); - } catch (e) { - console.error(e); - } - } - } + // const dbCli = path.join( + // EXTENSIONS_DIR, + // `${packageJson.publisher}.${packageJson.name}-${packageJson.version}`, + // "bin", + // "databricks" + // ); + // const subfolders = await fs.readdir(WORKSPACE_PATH, { + // withFileTypes: true, + // }); + // for (const folder of subfolders) { + // if (folder.isDirectory()) { + // const folderPath = path.join(WORKSPACE_PATH, folder.name); + // console.log(`Cleaning up ${folderPath}`); + // try { + // const res = await execFile( + // dbCli, + // ["bundle", "destroy", "--auto-approve", "--force-lock"], + // {cwd: folderPath} + // ); + // console.log(`'bundle destroy' output:`); + // console.log(res.stdout.trim()); + // console.log(res.stderr.trim()); + // } catch (e) { + // console.error(e); + // } + // } + // } }, /** From 0241f03f81dcadeaac2a104a129be702aa188e7a Mon Sep 17 00:00:00 2001 From: misha-db Date: Tue, 17 Mar 2026 20:32:12 +0400 Subject: [PATCH 13/14] Revert "Update wdio.conf.ts" This reverts commit de83e77a18d56aef11b8882edda85e6c66798e06. --- .../src/test/e2e/wdio.conf.ts | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts index 9d3538b9e..0c87aee19 100644 --- a/packages/databricks-vscode/src/test/e2e/wdio.conf.ts +++ b/packages/databricks-vscode/src/test/e2e/wdio.conf.ts @@ -498,33 +498,33 @@ export const config: Options.Testrunner = { console.log("Starting cleanup"); console.log("Extensions dir:", EXTENSIONS_DIR); console.log("Workspace dir:", WORKSPACE_PATH); - // const dbCli = path.join( - // EXTENSIONS_DIR, - // `${packageJson.publisher}.${packageJson.name}-${packageJson.version}`, - // "bin", - // "databricks" - // ); - // const subfolders = await fs.readdir(WORKSPACE_PATH, { - // withFileTypes: true, - // }); - // for (const folder of subfolders) { - // if (folder.isDirectory()) { - // const folderPath = path.join(WORKSPACE_PATH, folder.name); - // console.log(`Cleaning up ${folderPath}`); - // try { - // const res = await execFile( - // dbCli, - // ["bundle", "destroy", "--auto-approve", "--force-lock"], - // {cwd: folderPath} - // ); - // console.log(`'bundle destroy' output:`); - // console.log(res.stdout.trim()); - // console.log(res.stderr.trim()); - // } catch (e) { - // console.error(e); - // } - // } - // } + const dbCli = path.join( + EXTENSIONS_DIR, + `${packageJson.publisher}.${packageJson.name}-${packageJson.version}`, + "bin", + "databricks" + ); + const subfolders = await fs.readdir(WORKSPACE_PATH, { + withFileTypes: true, + }); + for (const folder of subfolders) { + if (folder.isDirectory()) { + const folderPath = path.join(WORKSPACE_PATH, folder.name); + console.log(`Cleaning up ${folderPath}`); + try { + const res = await execFile( + dbCli, + ["bundle", "destroy", "--auto-approve", "--force-lock"], + {cwd: folderPath} + ); + console.log(`'bundle destroy' output:`); + console.log(res.stdout.trim()); + console.log(res.stderr.trim()); + } catch (e) { + console.error(e); + } + } + } }, /** From 6fe5beb06b07e88c2779b32ec96a4c7fb379f027 Mon Sep 17 00:00:00 2001 From: Misha Kezherashvili Date: Wed, 18 Mar 2026 14:36:29 +0400 Subject: [PATCH 14/14] Update run_files.e2e.ts --- packages/databricks-vscode/src/test/e2e/run_files.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts index 3729431b7..b88a13c35 100644 --- a/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts +++ b/packages/databricks-vscode/src/test/e2e/run_files.e2e.ts @@ -16,7 +16,7 @@ import { describe("Run files", async function () { let projectDir: string; - this.timeout(3 * 60 * 1000); + this.timeout(6 * 60 * 1000); before(async () => { assert(process.env.WORKSPACE_PATH, "WORKSPACE_PATH doesn't exist");