Path: blob/main/test/smoke/src/areas/terminal/terminal.test.ts
3520 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { Application, Terminal, TerminalCommandId, Logger } from '../../../../automation';6import { installAllHandlers } from '../../utils';7import { setup as setupTerminalEditorsTests } from './terminal-editors.test';8import { setup as setupTerminalInputTests } from './terminal-input.test';9import { setup as setupTerminalPersistenceTests } from './terminal-persistence.test';10import { setup as setupTerminalProfileTests } from './terminal-profiles.test';11import { setup as setupTerminalTabsTests } from './terminal-tabs.test';12import { setup as setupTerminalSplitCwdTests } from './terminal-splitCwd.test';13import { setup as setupTerminalStickyScrollTests } from './terminal-stickyScroll.test';14import { setup as setupTerminalShellIntegrationTests } from './terminal-shellIntegration.test';1516export function setup(logger: Logger) {17describe('Terminal', function () {1819// Retry tests 3 times to minimize build failures due to any flakiness20this.retries(3);2122// Shared before/after handling23installAllHandlers(logger);2425let app: Application;26let terminal: Terminal;27before(async function () {28// Fetch terminal automation API29app = this.app as Application;30terminal = app.workbench.terminal;31});3233afterEach(async () => {34// Kill all terminals between every test for a consistent testing environment35await terminal.runCommand(TerminalCommandId.KillAll);36});3738// https://github.com/microsoft/vscode/issues/21656439// The pty host can crash on Linux in smoke tests for an unknown reason. We need more user40// reports to investigate41setupTerminalEditorsTests({ skipSuite: process.platform === 'linux' });42setupTerminalInputTests({ skipSuite: process.platform === 'linux' });43setupTerminalPersistenceTests({ skipSuite: process.platform === 'linux' });44setupTerminalProfileTests({ skipSuite: process.platform === 'linux' });45setupTerminalTabsTests({ skipSuite: process.platform === 'linux' });46setupTerminalShellIntegrationTests({ skipSuite: process.platform === 'linux' });47setupTerminalStickyScrollTests({ skipSuite: true });48// https://github.com/microsoft/vscode/pull/14197449// Windows is skipped here as well as it was never enabled from the start50setupTerminalSplitCwdTests({ skipSuite: process.platform === 'linux' || process.platform === 'win32' });51});52}535455