Skip to content

Commit 8e0cd66

Browse files
committed
Add server-cli smoke test
1 parent 8b6e403 commit 8e0cd66

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/smoke/src/areas/terminal/terminal.test.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
*--------------------------------------------------------------------------------------------*/
44

55
import minimist = require('minimist');
6-
import { Application } from '../../../../automation';
6+
import * as path from 'path';
7+
import { Application, Quality } from '../../../../automation';
78
import { afterSuite, beforeSuite } from '../../utils';
89

910
export function setup(opts: minimist.ParsedArgs) {
@@ -18,5 +19,23 @@ export function setup(opts: minimist.ParsedArgs) {
1819
await app.workbench.terminal.runCommand('ls');
1920
await app.workbench.terminal.waitForTerminalText(lines => lines.some(l => l.includes('app.js')));
2021
});
22+
23+
it('shows terminal and runs cli command', async function () {
24+
const app = this.app as Application;
25+
26+
if (app.quality !== Quality.Dev) {
27+
this.skip();
28+
}
29+
30+
const rootPath = process.env['VSCODE_REPOSITORY'];
31+
if (!rootPath) {
32+
throw new Error('VSCODE_REPOSITORY env variable not found');
33+
}
34+
35+
const cliPath = path.join(rootPath, 'out', 'server-cli.js');
36+
37+
await app.workbench.terminal.runCommand(`node ${cliPath} app.js`);
38+
await app.workbench.editors.waitForActiveTab('app.js');
39+
});
2140
});
2241
}

0 commit comments

Comments
 (0)