Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/test/smoke/src/areas/terminal/terminal.test.ts
3520 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Application, Terminal, TerminalCommandId, Logger } from '../../../../automation';
7
import { installAllHandlers } from '../../utils';
8
import { setup as setupTerminalEditorsTests } from './terminal-editors.test';
9
import { setup as setupTerminalInputTests } from './terminal-input.test';
10
import { setup as setupTerminalPersistenceTests } from './terminal-persistence.test';
11
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
12
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';
13
import { setup as setupTerminalSplitCwdTests } from './terminal-splitCwd.test';
14
import { setup as setupTerminalStickyScrollTests } from './terminal-stickyScroll.test';
15
import { setup as setupTerminalShellIntegrationTests } from './terminal-shellIntegration.test';
16
17
export function setup(logger: Logger) {
18
describe('Terminal', function () {
19
20
// Retry tests 3 times to minimize build failures due to any flakiness
21
this.retries(3);
22
23
// Shared before/after handling
24
installAllHandlers(logger);
25
26
let app: Application;
27
let terminal: Terminal;
28
before(async function () {
29
// Fetch terminal automation API
30
app = this.app as Application;
31
terminal = app.workbench.terminal;
32
});
33
34
afterEach(async () => {
35
// Kill all terminals between every test for a consistent testing environment
36
await terminal.runCommand(TerminalCommandId.KillAll);
37
});
38
39
// https://github.com/microsoft/vscode/issues/216564
40
// The pty host can crash on Linux in smoke tests for an unknown reason. We need more user
41
// reports to investigate
42
setupTerminalEditorsTests({ skipSuite: process.platform === 'linux' });
43
setupTerminalInputTests({ skipSuite: process.platform === 'linux' });
44
setupTerminalPersistenceTests({ skipSuite: process.platform === 'linux' });
45
setupTerminalProfileTests({ skipSuite: process.platform === 'linux' });
46
setupTerminalTabsTests({ skipSuite: process.platform === 'linux' });
47
setupTerminalShellIntegrationTests({ skipSuite: process.platform === 'linux' });
48
setupTerminalStickyScrollTests({ skipSuite: true });
49
// https://github.com/microsoft/vscode/pull/141974
50
// Windows is skipped here as well as it was never enabled from the start
51
setupTerminalSplitCwdTests({ skipSuite: process.platform === 'linux' || process.platform === 'win32' });
52
});
53
}
54
55