mirror of
https://github.com/Microsoft/vscode
synced 2024-10-06 03:17:00 +00:00
parent
68e491f99f
commit
d7f10626b8
|
@ -4,22 +4,16 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ParsedArgs } from 'minimist';
|
||||
import { Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation/out';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation/out';
|
||||
|
||||
export function setup(opts: ParsedArgs) {
|
||||
describe('Terminal Editors', () => {
|
||||
let terminal: Terminal;
|
||||
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
before(function () {
|
||||
terminal = this.app.workbench.terminal;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await terminal.runCommand(TerminalCommandId.KillAll);
|
||||
// Acquire automation API
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
terminal = app.workbench.terminal;
|
||||
});
|
||||
|
||||
// TODO: This was flaky in CI
|
||||
|
|
|
@ -5,26 +5,15 @@
|
|||
|
||||
import { ParsedArgs } from 'minimist';
|
||||
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation/out';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup(opts: ParsedArgs) {
|
||||
describe('Terminal Persistence', () => {
|
||||
let terminal: Terminal;
|
||||
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
// Acquire automation API
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
terminal = app.workbench.terminal;
|
||||
|
||||
// Always show tabs to make getting terminal groups easier
|
||||
await app.workbench.settingsEditor.addUserSetting('terminal.integrated.tabs.hideCondition', '"never"');
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
|
||||
describe('detach/attach', () => {
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ParsedArgs } from 'minimist';
|
||||
import { Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation';
|
||||
|
||||
const CONTRIBUTED_PROFILE_NAME = `JavaScript Debug Terminal`;
|
||||
const ANY_PROFILE_NAME = '^((?!JavaScript Debug Terminal).)*$';
|
||||
|
@ -14,15 +13,10 @@ export function setup(opts: ParsedArgs) {
|
|||
describe('Terminal Profiles', () => {
|
||||
let terminal: Terminal;
|
||||
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
before(function () {
|
||||
terminal = this.app.workbench.terminal;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await terminal.runCommand(TerminalCommandId.KillAll);
|
||||
// Acquire automation API
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
terminal = app.workbench.terminal;
|
||||
});
|
||||
|
||||
it('should launch the default profile', async () => {
|
||||
|
|
|
@ -5,22 +5,16 @@
|
|||
|
||||
|
||||
import { ParsedArgs } from 'minimist';
|
||||
import { Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation/out';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
import { Application, Terminal, TerminalCommandId, TerminalCommandIdWithValue } from '../../../../automation/out';
|
||||
|
||||
export function setup(opts: ParsedArgs) {
|
||||
describe('Terminal Tabs', () => {
|
||||
let terminal: Terminal;
|
||||
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
before(function () {
|
||||
terminal = this.app.workbench.terminal;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await terminal.runCommand(TerminalCommandId.KillAll);
|
||||
// Acquire automation API
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
terminal = app.workbench.terminal;
|
||||
});
|
||||
|
||||
it('clicking the plus button should create a terminal and display the tabs view showing no split decorations', async () => {
|
||||
|
|
44
test/smoke/src/areas/terminal/terminal.test.ts
Normal file
44
test/smoke/src/areas/terminal/terminal.test.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, Terminal, TerminalCommandId } from '../../../../automation/out';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
import { setup as setupTerminalEditorsTests } from './terminal-editors.test';
|
||||
import { setup as setupTerminalPersistenceTests } from './terminal-persistence.test';
|
||||
import { setup as setupTerminalProfileTests } from './terminal-profiles.test';
|
||||
import { setup as setupTerminalTabsTests } from './terminal-tabs.test';
|
||||
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe.only('Terminal', () => {
|
||||
// TODO: Enable terminal tests for non-web when it moved to playwright
|
||||
if (!opts.web) {
|
||||
return;
|
||||
}
|
||||
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
let terminal: Terminal;
|
||||
before(async function () {
|
||||
// Fetch terminal automation API
|
||||
const app = this.app as Application;
|
||||
terminal = app.workbench.terminal;
|
||||
|
||||
// Always show tabs to make getting terminal groups easier
|
||||
await app.workbench.settingsEditor.addUserSetting('terminal.integrated.tabs.hideCondition', '"never"');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Kill all terminals between every test for a consistent testing environment
|
||||
await terminal.runCommand(TerminalCommandId.KillAll);
|
||||
});
|
||||
|
||||
setupTerminalEditorsTests(opts);
|
||||
setupTerminalPersistenceTests(opts);
|
||||
setupTerminalProfileTests(opts);
|
||||
setupTerminalTabsTests(opts);
|
||||
});
|
||||
}
|
|
@ -28,10 +28,7 @@ import { setup as setupExtensionTests } from './areas/extensions/extensions.test
|
|||
import { setup as setupMultirootTests } from './areas/multiroot/multiroot.test';
|
||||
import { setup as setupLocalizationTests } from './areas/workbench/localization.test';
|
||||
import { setup as setupLaunchTests } from './areas/workbench/launch.test';
|
||||
import { setup as setupTerminalProfileTests } from './areas/terminal/terminal-profiles.test';
|
||||
import { setup as setupTerminalTabsTests } from './areas/terminal/terminal-tabs.test';
|
||||
import { setup as setupTerminalEditorsTests } from './areas/terminal/terminal-editors.test';
|
||||
import { setup as setupTerminalPersistenceTests } from './areas/terminal/terminal-persistence.test';
|
||||
import { setup as setupTerminalTests } from './areas/terminal/terminal.test';
|
||||
|
||||
try {
|
||||
gracefulify(fs);
|
||||
|
@ -362,15 +359,10 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
|||
setupNotebookTests(opts);
|
||||
setupLanguagesTests(opts);
|
||||
setupEditorTests(opts);
|
||||
setupTerminalTests(opts);
|
||||
setupStatusbarTests(opts);
|
||||
setupExtensionTests(opts);
|
||||
if (!opts.web) { setupMultirootTests(opts); }
|
||||
if (!opts.web) { setupLocalizationTests(opts); }
|
||||
if (!opts.web) { setupLaunchTests(opts); }
|
||||
|
||||
// TODO: Enable terminal tests for non-web when it moved to playwright
|
||||
if (opts.web) { setupTerminalProfileTests(opts); }
|
||||
if (opts.web) { setupTerminalTabsTests(opts); }
|
||||
if (opts.web) { setupTerminalEditorsTests(opts); }
|
||||
if (opts.web) { setupTerminalPersistenceTests(opts); }
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue