From 651403263634a2b4d14ef16ad46b5c1610b65732 Mon Sep 17 00:00:00 2001 From: Megan Rogge Date: Sun, 21 Nov 2021 15:12:24 -0800 Subject: [PATCH] start working --- src/vs/workbench/contrib/terminal/browser/terminalActions.ts | 4 ++-- test/smoke/src/main.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts index 0ee189630af..2c25acb9c2a 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalActions.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalActions.ts @@ -1701,13 +1701,13 @@ export function registerTerminalActions() { } }); } - async run(accessor: ServicesAccessor, eventOrOptions: MouseEvent | ICreateTerminalOptions | undefined) { + async run(accessor: ServicesAccessor, eventOrOptions: MouseEvent | ICreateTerminalOptions | undefined, testFolders?: IWorkspaceFolder[]) { const terminalService = accessor.get(ITerminalService); const terminalGroupService = accessor.get(ITerminalGroupService); const workspaceContextService = accessor.get(IWorkspaceContextService); const commandService = accessor.get(ICommandService); const configurationService = accessor.get(IConfigurationService); - const folders = workspaceContextService.getWorkspace().folders; + const folders = workspaceContextService.getWorkspace().folders || testFolders; if (eventOrOptions && eventOrOptions instanceof MouseEvent && (eventOrOptions.altKey || eventOrOptions.ctrlKey)) { const activeInstance = terminalService.activeInstance; if (activeInstance) { diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index 734aef1733d..fb687e86df2 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -30,6 +30,7 @@ import { setup as setupLaunchTests } from './areas/workbench/launch.test'; import { setup as setupTerminalProfileTests } from './areas/terminal/terminal-profiles.test'; import { setup as setupTerminalTabsTests } from './areas/terminal/terminal-tabs.test'; import { setup as setupTerminalEditorsTests } from './areas/terminal/terminal-editors.test'; +import { setup as setupTerminalMultirootTests } from './areas/terminal/terminal-multiroot.test'; const testDataPath = path.join(os.tmpdir(), 'vscsmoke'); if (fs.existsSync(testDataPath)) { @@ -364,4 +365,7 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => { if (opts.web) { setupTerminalProfileTests(opts); } if (opts.web) { setupTerminalTabsTests(opts); } if (opts.web) { setupTerminalEditorsTests(opts); } + if (opts.web) { + setupTerminalMultirootTests(opts); + } });