diff --git a/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts b/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts index 720c0df2177..24dc769beb8 100644 --- a/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts +++ b/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts @@ -7,29 +7,32 @@ import { Application, Terminal, SettingsEditor, TerminalCommandIdWithValue, Term import { setTerminalTestSettings } from './terminal-helpers'; export function setup() { - describe('Terminal Shell Integration', () => { - let terminal: Terminal; - let settingsEditor: SettingsEditor; - let app: Application; - // Acquire automation API - before(async function () { - app = this.app as Application; - terminal = app.workbench.terminal; - settingsEditor = app.workbench.settingsEditor; - await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.enabled', 'true'); - await setTerminalTestSettings(app); - }); + for (let i = 0; i < 100; i++) { + describe(`Terminal Shell Integration ${i}`, () => { + let terminal: Terminal; + let settingsEditor: SettingsEditor; + let app: Application; + // Acquire automation API + before(async function () { + app = this.app as Application; + terminal = app.workbench.terminal; + settingsEditor = app.workbench.settingsEditor; + await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.enabled', 'true'); + await setTerminalTestSettings(app); + }); - afterEach(async function () { - await app.workbench.terminal.runCommand(TerminalCommandId.KillAll); - await settingsEditor.clearUserSettings(); - }); + after(async function () { + await settingsEditor.clearUserSettings(); + }); - async function createShellIntegrationProfile() { - await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, process.platform === 'win32' ? 'PowerShell' : 'bash'); - } + afterEach(async function () { + await app.workbench.terminal.runCommand(TerminalCommandId.KillAll); + }); + + async function createShellIntegrationProfile() { + await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, process.platform === 'win32' ? 'PowerShell' : 'bash'); + } - for (let i = 0; i < 100; i++) { describe(`Shell integration ${i}`, function () { describe('Decorations', function () { describe('Should show default icons', function () { @@ -39,7 +42,7 @@ export function setup() { }); it('Success', async () => { await createShellIntegrationProfile(); - await terminal.runCommandInTerminal(`ls`); + await terminal.runCommandInTerminal(`echo "success"`); await terminal.assertCommandDecorations({ placeholder: 1, success: 1, error: 0 }); }); it('Error', async () => { @@ -52,7 +55,7 @@ export function setup() { it('Should update and show custom icons', async () => { await createShellIntegrationProfile(); await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 0 }); - await terminal.runCommandInTerminal(`ls`); + await terminal.runCommandInTerminal(`echo "success"`); await terminal.runCommandInTerminal(`fsdkfsjdlfksjdkf`); await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIcon', '"zap"'); await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIconSuccess', '"zap"'); @@ -62,6 +65,6 @@ export function setup() { }); }); }); - } - }); + }); + } }