From fa1e2afd993718d4daed0a42837563d065a33feb Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:53:11 -0700 Subject: [PATCH] Set SI to enabled in integration tests --- .../terminal.shellIntegration.test.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.shellIntegration.test.ts b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.shellIntegration.test.ts index c86821a0511..7345edf15b8 100644 --- a/extensions/vscode-api-tests/src/singlefolder-tests/terminal.shellIntegration.test.ts +++ b/extensions/vscode-api-tests/src/singlefolder-tests/terminal.shellIntegration.test.ts @@ -5,14 +5,23 @@ import { deepStrictEqual, notStrictEqual, ok, strictEqual } from 'assert'; import { platform } from 'os'; -import { env, TerminalShellExecutionCommandLineConfidence, UIKind, window, type Disposable, type Terminal, type TerminalShellExecution, type TerminalShellExecutionCommandLine, type TerminalShellExecutionEndEvent, type TerminalShellIntegration } from 'vscode'; +import { env, TerminalShellExecutionCommandLineConfidence, UIKind, window, workspace, type Disposable, type Terminal, type TerminalShellExecution, type TerminalShellExecutionCommandLine, type TerminalShellExecutionEndEvent, type TerminalShellIntegration } from 'vscode'; import { assertNoRpc } from '../utils'; -// Disable terminal tests: -// - Web https://github.com/microsoft/vscode/issues/92826 +// Terminal integration tests are disabled on web https://github.com/microsoft/vscode/issues/92826 (env.uiKind === UIKind.Web ? suite.skip : suite)('vscode API - Terminal.shellIntegration', () => { const disposables: Disposable[] = []; + suiteSetup(async () => { + const config = workspace.getConfiguration('terminal.integrated'); + await config.update('shellIntegration.enabled', true); + }); + + suiteTeardown(async () => { + const config = workspace.getConfiguration('terminal.integrated'); + await config.update('shellIntegration.enabled', undefined); + }); + teardown(async () => { assertNoRpc(); disposables.forEach(d => d.dispose());