mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
QuickInput Proposed API (#49340)
This commit is contained in:
@@ -417,7 +417,7 @@ suite('window namespace tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('Default value for showInput Box accepted even if fails validateInput, #33691', function () {
|
||||
test('Default value for showInput Box not accepted when it fails validateInput, reversing #33691', async function () {
|
||||
const result = window.showInputBox({
|
||||
validateInput: (value: string) => {
|
||||
if (!value || value.trim().length === 0) {
|
||||
@@ -427,19 +427,9 @@ suite('window namespace tests', () => {
|
||||
}
|
||||
});
|
||||
|
||||
const accept = commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
|
||||
return Promise.race([
|
||||
result.then(() => assert.ok(false)),
|
||||
accept.then(() => assert.ok(false), err => assert.ok(err))
|
||||
.then(() => new Promise(resolve => setTimeout(resolve, 10)))
|
||||
])
|
||||
.then(() => {
|
||||
const close = commands.executeCommand('workbench.action.closeQuickOpen');
|
||||
return Promise.all([result, close])
|
||||
.then(([value]) => {
|
||||
assert.equal(value, undefined);
|
||||
});
|
||||
});
|
||||
await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');
|
||||
await commands.executeCommand('workbench.action.closeQuickOpen');
|
||||
assert.equal(await result, undefined);
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user