mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Run shell integration tests a single time and revert timeout
This commit is contained in:
parent
d4e06aaa2b
commit
463a1e5765
|
@ -103,7 +103,7 @@ steps:
|
|||
set -e
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
|
||||
yarn smoketest-no-compile --web --tracing --headless
|
||||
timeoutInMinutes: 30
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Browser, Chromium)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
|
||||
|
@ -112,7 +112,7 @@ steps:
|
|||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
|
||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
|
||||
timeoutInMinutes: 30
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Electron)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
|
||||
|
@ -123,7 +123,7 @@ steps:
|
|||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
|
||||
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
|
||||
timeoutInMinutes: 30
|
||||
timeoutInMinutes: 20
|
||||
displayName: Run smoke tests (Remote)
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
|
||||
|
|
|
@ -7,66 +7,64 @@ import { Application, Terminal, SettingsEditor, TerminalCommandIdWithValue, Term
|
|||
import { setTerminalTestSettings } from './terminal-helpers';
|
||||
|
||||
export function setup() {
|
||||
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 setTerminalTestSettings(app, [['terminal.integrated.shellIntegration.enabled', 'true']]);
|
||||
});
|
||||
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 setTerminalTestSettings(app, [['terminal.integrated.shellIntegration.enabled', 'true']]);
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
await app.workbench.terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
afterEach(async function () {
|
||||
await app.workbench.terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
await settingsEditor.clearUserSettings();
|
||||
});
|
||||
after(async function () {
|
||||
await settingsEditor.clearUserSettings();
|
||||
});
|
||||
|
||||
async function createShellIntegrationProfile() {
|
||||
await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, process.platform === 'win32' ? 'PowerShell' : 'bash');
|
||||
}
|
||||
async function createShellIntegrationProfile() {
|
||||
await terminal.runCommandWithValue(TerminalCommandIdWithValue.NewWithProfile, process.platform === 'win32' ? 'PowerShell' : 'bash');
|
||||
}
|
||||
|
||||
// TODO: Some agents may not have pwsh installed?
|
||||
(process.platform === 'win32' ? describe.skip : describe)(`Shell integration`, function () {
|
||||
describe('Decorations', function () {
|
||||
describe('Should show default icons', function () {
|
||||
// TODO: Some agents may not have pwsh installed?
|
||||
(process.platform === 'win32' ? describe.skip : describe)(`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 });
|
||||
});
|
||||
it('Success', async () => {
|
||||
await createShellIntegrationProfile();
|
||||
await terminal.runCommandInTerminal(`echo "success"`);
|
||||
await terminal.assertCommandDecorations({ placeholder: 1, success: 1, error: 0 });
|
||||
});
|
||||
it('Error', async () => {
|
||||
await createShellIntegrationProfile();
|
||||
await terminal.runCommandInTerminal(`false`);
|
||||
await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 1 });
|
||||
});
|
||||
it('Placeholder', async () => {
|
||||
await createShellIntegrationProfile();
|
||||
await terminal.assertCommandDecorations({ placeholder: 1, success: 0, error: 0 });
|
||||
});
|
||||
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(`echo "foo"`);
|
||||
await terminal.runCommandInTerminal(`bar`);
|
||||
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 });
|
||||
await app.workbench.terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
it('Success', async () => {
|
||||
await createShellIntegrationProfile();
|
||||
await terminal.runCommandInTerminal(`echo "success"`);
|
||||
await terminal.assertCommandDecorations({ placeholder: 1, success: 1, error: 0 });
|
||||
});
|
||||
it('Error', async () => {
|
||||
await createShellIntegrationProfile();
|
||||
await terminal.runCommandInTerminal(`false`);
|
||||
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(`echo "foo"`);
|
||||
await terminal.runCommandInTerminal(`bar`);
|
||||
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 });
|
||||
await app.workbench.terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue