提交 06b06ca1 编写于 作者: B Benjamin Pasero

smoke - move quick open tests into search

上级 b7a29c77
/*---------------------------------------------------------------------------------------------
* 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 '../../../../automation';
export function setup() {
describe('Explorer', () => {
it('quick open search produces correct result', async function () {
const app = this.app as Application;
const expectedNames = [
'.eslintrc.json',
'tasks.json',
'app.js',
'index.js',
'users.js',
'package.json',
'jsconfig.json'
];
await app.workbench.quickopen.openQuickOpen('.js');
await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});
it('quick open respects fuzzy matching', async function () {
const app = this.app as Application;
const expectedNames = [
'tasks.json',
'app.js',
'package.json'
];
await app.workbench.quickopen.openQuickOpen('a.s');
await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});
});
}
......@@ -56,4 +56,36 @@ export function setup() {
await app.workbench.search.waitForNoResultText();
});
});
describe('Quick Open', () => {
it('quick open search produces correct result', async function () {
const app = this.app as Application;
const expectedNames = [
'.eslintrc.json',
'tasks.json',
'app.js',
'index.js',
'users.js',
'package.json',
'jsconfig.json'
];
await app.workbench.quickopen.openQuickOpen('.js');
await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});
it('quick open respects fuzzy matching', async function () {
const app = this.app as Application;
const expectedNames = [
'tasks.json',
'app.js',
'package.json'
];
await app.workbench.quickopen.openQuickOpen('a.s');
await app.workbench.quickopen.waitForQuickOpenElements(names => expectedNames.every(n => names.some(m => n === m)));
await app.code.dispatchKeybinding('escape');
});
});
}
......@@ -23,7 +23,6 @@ import {
import { setup as setupDataMigrationTests } from './areas/workbench/data-migration.test';
import { setup as setupDataLossTests } from './areas/workbench/data-loss.test';
import { setup as setupDataExplorerTests } from './areas/explorer/explorer.test';
import { setup as setupDataPreferencesTests } from './areas/preferences/preferences.test';
import { setup as setupDataSearchTests } from './areas/search/search.test';
import { setup as setupDataCSSTests } from './areas/css/css.test';
......@@ -311,7 +310,6 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
else {
if (!opts.web) { setupDataMigrationTests(opts['stable-build'], testDataPath); }
if (!opts.web) { setupDataLossTests(); }
setupDataExplorerTests();
if (!opts.web) { setupDataPreferencesTests(); }
setupDataSearchTests();
setupDataCSSTests();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册