From a1128b67510256f71ce2cd75330d52330bbd4f35 Mon Sep 17 00:00:00 2001 From: Louis Johnston Date: Mon, 30 Nov 2026 09:19:51 +0000 Subject: [PATCH] [3.0] e2e: read the workspace row's description from the DOM, not visible text waitForLogin and waitForWorkspaceConnection read the Workspace connection row's description as WebDriver visible text. After the spec selects that row, VS Code's inline actions can clip the description fully out of view, so the read returned "" even after the profile switch had finished. The helpers now read the description span's textContent, which doesn't depend on whether the span is clipped. They still wait for the same profile text. Co-authored-by: Isaac --- .../src/utils/configuration.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/databricks-vscode-e2e/src/utils/configuration.ts b/packages/databricks-vscode-e2e/src/utils/configuration.ts index 23f84d170..f8519902d 100644 --- a/packages/databricks-vscode-e2e/src/utils/configuration.ts +++ b/packages/databricks-vscode-e2e/src/utils/configuration.ts @@ -62,6 +62,16 @@ export async function getWorkspaceConnectionItem(): Promise { + const item = await getWorkspaceConnectionItem(); + return item && String(await item.description$.getProperty("textContent")); +} + /** The PROJECT section's "Local Folder" item, if it points at `folder`. */ export async function getLocalFolderTreeItem(folder: string) { const section = (await getViewSection("PROJECT")) as CustomTreeSection; @@ -105,7 +115,7 @@ export async function waitForLogin(profileName: string) { let last: string | undefined; await waitUntilSeen( async () => { - last = await (await getWorkspaceConnectionItem())?.getDescription(); + last = await workspaceConnectionDescription(); return last === profileName || last?.startsWith(`${profileName} ยท for target `); }, { @@ -128,7 +138,7 @@ export async function waitForWorkspaceConnection(description: string, timeout = await waitUntilSeen( async () => { try { - last = await (await getWorkspaceConnectionItem())?.getDescription(); + last = await workspaceConnectionDescription(); error = undefined; } catch (e) { last = undefined;