mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
Smoke test for multi root (#31059)
* wip * fix for windows * add some tests * only run multi root test on windows * fix bug with opening files into a workspace that opens (enables smoke test) * document how to run against out of source * enable test for all OS
This commit is contained in:
42
test/smoke/src/tests/multiroot.ts
Normal file
42
test/smoke/src/tests/multiroot.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as assert from 'assert';
|
||||
|
||||
import { SpectronApplication, LATEST_PATH, CODE_WORKSPACE_PATH } from "../spectron/application";
|
||||
import { CommonActions } from '../areas/common';
|
||||
|
||||
let app: SpectronApplication;
|
||||
let common: CommonActions;
|
||||
|
||||
export function testMultiRoot() {
|
||||
context('Multi Root', () => {
|
||||
|
||||
beforeEach(async function () {
|
||||
app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [CODE_WORKSPACE_PATH]);
|
||||
common = new CommonActions(app);
|
||||
|
||||
return await app.start();
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
return await app.stop();
|
||||
});
|
||||
|
||||
it('shows results from all folders', async function () {
|
||||
await common.openQuickOpen();
|
||||
await common.type('*.*');
|
||||
await app.wait();
|
||||
const elCount = await common.getQuickOpenElements();
|
||||
assert.equal(elCount, 6);
|
||||
});
|
||||
|
||||
it('shows workspace name in title', async function () {
|
||||
await app.wait();
|
||||
const title = await common.getWindowTitle();
|
||||
assert.ok(title.indexOf('smoketest (Workspace)') >= 0);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user