Files
vscode/test/smoke/src/tests/multiroot.ts
Benjamin Pasero 4f074abe22 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
2017-07-20 16:01:21 +02:00

42 lines
1.4 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 * 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);
});
});
}