From 1f5dc6a5729795f80b92f6de5a76d78462640662 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Wed, 15 Jun 2022 06:59:40 -0700 Subject: [PATCH] Run shell integration tests 100 times in CI Part of #150478 --- .../terminal-shellIntegration.test.ts | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts b/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts index 47d624633f2..0bc30da5b58 100644 --- a/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts +++ b/test/smoke/src/areas/terminal/terminal-shellIntegration.test.ts @@ -28,38 +28,39 @@ export function setup() { await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, process.platform === 'win32' ? 'PowerShell' : 'bash'); } - // TODO: These are currently flaky https://github.com/microsoft/vscode/issues/150478 - describe.skip('Shell integration', function () { - describe('Decorations', function () { - describe('Should show default icons', function () { - it('Placeholder', async () => { - await createShellIntegrationProfile(); - await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 0 }); + for (let i = 0; i < 100; i++) { + describe(`Shell integration ${i}`, function () { + describe('Decorations', function () { + describe('Should show default icons', function () { + it('Placeholder', async () => { + await createShellIntegrationProfile(); + await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 0 }); + }); + it('Success', async () => { + await createShellIntegrationProfile(); + await terminal.runCommandInTerminal(`ls`); + await terminal.assertCommandDecorations({ placeholder: 1, success: 1, error: 0 }); + }); + it('Error', async () => { + await createShellIntegrationProfile(); + await terminal.runCommandInTerminal(`fsdkfsjdlfksjdkf`); + await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 1 }); + }); }); - it('Success', async () => { - await createShellIntegrationProfile(); - await terminal.runCommandInTerminal(`ls`); - await terminal.assertCommandDecorations({ placeholder: 1, success: 1, error: 0 }); - }); - it('Error', async () => { - await createShellIntegrationProfile(); - await terminal.runCommandInTerminal(`fsdkfsjdlfksjdkf`); - await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 1 }); - }); - }); - describe('Custom configuration', function () { - 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(`fsdkfsjdlfksjdkf`); - await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIcon', '"zap"'); - await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIconSuccess', '"zap"'); - await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIconError', '"zap"'); - await terminal.assertCommandDecorations(undefined, { updatedIcon: "zap", count: 3 }); + describe('Custom configuration', function () { + 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(`fsdkfsjdlfksjdkf`); + await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIcon', '"zap"'); + await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIconSuccess', '"zap"'); + await settingsEditor.addUserSetting('terminal.integrated.shellIntegration.decorationIconError', '"zap"'); + await terminal.assertCommandDecorations(undefined, { updatedIcon: "zap", count: 3 }); + }); }); }); }); - }); + } }); }