mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { Application } from '../../application';
|
|
|
|
export function setup() {
|
|
describe('Terminal', () => {
|
|
it(`opens terminal, runs 'echo' and verifies the output`, async function () {
|
|
const app = this.app as Application;
|
|
|
|
const expected = new Date().getTime().toString();
|
|
await app.workbench.terminal.showTerminal();
|
|
await app.workbench.terminal.runCommand(`echo ${expected}`);
|
|
await app.workbench.terminal.waitForTerminalText(terminalText => {
|
|
for (let index = terminalText.length - 2; index >= 0; index--) {
|
|
if (!!terminalText[index] && terminalText[index].trim() === expected) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
});
|
|
});
|
|
});
|
|
}
|