From 71a05a3c75759ae09f32793d78658d4d663ef57a Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Fri, 28 Aug 2026 03:49:37 -0400 Subject: [PATCH] test(e2e): keep sibling file links on one terminal row --- tests/e2e/golden-terminal-file-link.spec.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/e2e/golden-terminal-file-link.spec.ts b/tests/e2e/golden-terminal-file-link.spec.ts index 0e96b55a0b4..a5d940c4cb5 100644 --- a/tests/e2e/golden-terminal-file-link.spec.ts +++ b/tests/e2e/golden-terminal-file-link.spec.ts @@ -246,11 +246,26 @@ test('reuses a terminal file link already open in a sibling workspace @golden', await ensureTerminalVisible(orcaPage) await waitForActiveTerminalManager(orcaPage, 30_000) + await orcaPage.evaluate(() => { + const state = window.__store?.getState() + state?.setSidebarOpen(false) + state?.setRightSidebarOpen(false) + }) + await expect + .poll( + () => + orcaPage.evaluate(() => { + const state = window.__store?.getState() + const tabId = state?.activeTabId + const manager = tabId ? window.__paneManagers?.get(tabId) : null + return manager?.getActivePane?.()?.terminal.cols ?? 0 + }), + { message: 'terminal did not expand after closing the sidebars' } + ) + .toBeGreaterThan(120) const ptyId = await waitForActivePanePtyId(orcaPage, 30_000) await waitForPtyShellEcho(orcaPage, ptyId, 15_000) - const relativePath = path.relative(source.path, filePath) - const printedPath = - process.platform === 'win32' ? relativePath.replaceAll('\\', '/') : relativePath + const printedPath = process.platform === 'win32' ? filePath.replaceAll('\\', '/') : filePath const command = nodeTerminalCommand(['-e', `console.log(${JSON.stringify(printedPath)})`]) await sendToTerminal(orcaPage, ptyId, `${command}\r`) await expect