mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Writeable active and selected items (#49340, fixes vscode-azure-account#67)
This commit is contained in:
@@ -440,6 +440,18 @@ suite('window namespace tests', () => {
|
||||
assert.deepStrictEqual(await picks, ['eins', 'zwei']);
|
||||
});
|
||||
|
||||
test('showQuickPick, keep selection (Microsoft/vscode-azure-account#67)', async function () {
|
||||
const picks = window.showQuickPick([
|
||||
{ label: 'eins' },
|
||||
{ label: 'zwei', picked: true },
|
||||
{ label: 'drei', picked: true }
|
||||
], {
|
||||
canPickMany: true
|
||||
});
|
||||
await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
|
||||
assert.deepStrictEqual((await picks)!.map(pick => pick.label), ['zwei', 'drei']);
|
||||
});
|
||||
|
||||
test('showQuickPick, undefined on cancel', function () {
|
||||
const source = new CancellationTokenSource();
|
||||
const p = window.showQuickPick(['eins', 'zwei', 'drei'], undefined, source.token);
|
||||
|
||||
Reference in New Issue
Block a user