From 9685b9e398dfa816444dedef135d0d413b92d4a9 Mon Sep 17 00:00:00 2001 From: Louis Johnston Date: Fri, 20 Nov 2026 18:37:31 +0000 Subject: [PATCH] [3.0] e2e: wait for the Local Folder row after switching the sub folder project MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After choosing a folder, the select step waits for login and then until the PROJECT view's Local Folder row shows that folder. Both test bundles use the same target, so on the switch from nested1 to double/nested2 the Workspace connection row already read 'DEFAULT ยท for target dev_test', waitForLogin passed before the switch landed, and the next test's single read of the row still saw nested1. The new wait is on the row that test checks. Same fix as attempt 1, with the wait moved after waitForLogin: attempt 1's diff ended on a whitespace-only context line, which the controller's copy dropped (the 'corrupt patch' error); this diff ends on a code line and is unchanged by stripping trailing whitespace. Co-authored-by: Isaac --- .../databricks-vscode-e2e/src/bundle_sub_folder.e2e.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/databricks-vscode-e2e/src/bundle_sub_folder.e2e.ts b/packages/databricks-vscode-e2e/src/bundle_sub_folder.e2e.ts index c1ae6f82e..8a4fbd582 100644 --- a/packages/databricks-vscode-e2e/src/bundle_sub_folder.e2e.ts +++ b/packages/databricks-vscode-e2e/src/bundle_sub_folder.e2e.ts @@ -64,6 +64,16 @@ describe("Bundle in a sub folder", async function () { await subFoldersInput.selectQuickPick(folder); await waitForLogin("DEFAULT"); + // Both bundles use the same target, so on the second switch the + // connection row already read this before it; wait for the folder. + await browser.waitUntil( + async () => (await getLocalFolderTreeItem(folder)) !== undefined, + { + timeout: 60_000, + interval: 2_000, + timeoutMsg: `${folder} didn't become the active project`, + }, + ); }); it(`should show a Local Folder configuration item for ${folder}`, async () => {