mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
a bunch of failing tests
This commit is contained in:
@@ -6,12 +6,15 @@
|
||||
import * as assert from 'assert';
|
||||
import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind, QuickPickItem, TextEditor } from 'vscode';
|
||||
import { join } from 'path';
|
||||
import { closeAllEditors, pathEquals, createRandomFile } from '../utils';
|
||||
import { closeAllEditors, pathEquals, createRandomFile, assertNoRpc } from '../utils';
|
||||
|
||||
|
||||
suite('vscode API - window', () => {
|
||||
|
||||
teardown(closeAllEditors);
|
||||
teardown(async function () {
|
||||
assertNoRpc();
|
||||
await closeAllEditors();
|
||||
});
|
||||
|
||||
test('editor, active text editor', async () => {
|
||||
const doc = await workspace.openTextDocument(join(workspace.rootPath || '', './far.js'));
|
||||
@@ -429,8 +432,8 @@ suite('vscode API - window', () => {
|
||||
});
|
||||
|
||||
test('showQuickPick, select first two', async function () {
|
||||
const label = 'showQuickPick, select first two';
|
||||
let i = 0;
|
||||
// const label = 'showQuickPick, select first two';
|
||||
// let i = 0;
|
||||
const resolves: ((value: string) => void)[] = [];
|
||||
let done: () => void;
|
||||
const unexpected = new Promise<void>((resolve, reject) => {
|
||||
@@ -442,26 +445,26 @@ suite('vscode API - window', () => {
|
||||
canPickMany: true
|
||||
});
|
||||
const first = new Promise(resolve => resolves.push(resolve));
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
await new Promise(resolve => setTimeout(resolve, 100)); // Allow UI to update.
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
await commands.executeCommand('workbench.action.quickOpenSelectNext');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
assert.equal(await first, 'eins');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
await commands.executeCommand('workbench.action.quickPickManyToggle');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
const second = new Promise(resolve => resolves.push(resolve));
|
||||
await commands.executeCommand('workbench.action.quickOpenSelectNext');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
assert.equal(await second, 'zwei');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
await commands.executeCommand('workbench.action.quickPickManyToggle');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
assert.deepStrictEqual(await picks, ['eins', 'zwei']);
|
||||
console.log(`${label}: ${++i}`);
|
||||
// console.log(`${label}: ${++i}`);
|
||||
done!();
|
||||
return unexpected;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user