test: establish live WSL reader before changing default shell

This commit is contained in:
Neil
2026-09-06 04:59:55 -07:00
parent 72d4b6dc1b
commit 3a0f0282b8
@@ -423,10 +423,6 @@ test.describe('Windows terminal shell paste ownership', () => {
const wslDistro = await configureActiveProjectWslRuntime(orcaPage)
test.skip(!wslDistro, 'No WSL distro is available on this Windows host')
const tabId = await createWindowsProjectRuntimeTerminalTab(orcaPage, 'wsl.exe')
await updateWindowsDefaultShellSetting(orcaPage, 'cmd.exe')
await expect(
orcaPage.locator(`[data-testid="sortable-tab"][data-tab-id="${tabId}"] [data-shell-icon]`)
).toHaveAttribute('data-shell-icon', 'wsl.exe')
await waitForActiveTerminalManager(orcaPage, 30_000)
await installTerminalPtyWriteSpy(electronApp)
@@ -454,6 +450,13 @@ test.describe('Windows terminal shell paste ownership', () => {
scriptStarted = true
await waitForTerminalOutput(orcaPage, `PASTE_READY_${runId}`, 10_000)
// Exercise a live WSL process across the settings change.
await updateWindowsDefaultShellSetting(orcaPage, 'cmd.exe')
await expect(
orcaPage.locator(`[data-testid="sortable-tab"][data-tab-id="${tabId}"] [data-shell-icon]`)
).toHaveAttribute('data-shell-icon', 'wsl.exe')
expect(await waitForActivePanePtyId(orcaPage)).toBe(ptyId)
await clearTerminalPtyWriteLog(electronApp)
await orcaPage.evaluate((text) => window.api.ui.writeClipboardText(text), payload)
await focusActiveTerminalInput(orcaPage)