mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
test: establish live WSL reader before changing default shell
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user