-
Notifications
You must be signed in to change notification settings - Fork 715
Change VS Code confirmation message to quick pick in interaction service #12263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -78,6 +78,41 @@ suite('InteractionService endpoints', () => { | |||
| showInputBoxStub.restore(); | ||||
| }); | ||||
|
|
||||
| // confirm | ||||
| test('confirm returns true when Yes is selected', async () => { | ||||
| const testInfo = await createTestRpcServer(); | ||||
| const showQuickPickStub = sinon.stub(vscode.window, 'showQuickPick').resolves('Yes' as any); | ||||
| const result = await testInfo.interactionService.confirm('Are you sure?', true); | ||||
| assert.strictEqual(result, true); | ||||
| assert.ok(showQuickPickStub.calledOnce, 'showQuickPick should be called once'); | ||||
|
|
||||
| // Verify options passed to showQuickPick | ||||
| const callArgs = showQuickPickStub.getCall(0).args; | ||||
| assert.deepStrictEqual(callArgs[0], ['Yes', 'No'], 'should show Yes and No choices'); | ||||
| assert.strictEqual(callArgs[1]?.canPickMany, false, 'canPickMany should be false'); | ||||
| assert.strictEqual(callArgs[1]?.ignoreFocusOut, true, 'ignoreFocusOut should be true'); | ||||
|
|
||||
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1006,10 +1006,10 @@ | |
| ora "^8.1.0" | ||
| semver "^7.6.2" | ||
|
|
||
| "@vscode/vsce-sign-win32[email protected]": | ||
| "@vscode/vsce-sign-linux[email protected]": | ||
| version "2.0.2" | ||
| resolved "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.2.tgz" | ||
| integrity sha1-KU6nK0T+3WlNSfXO9MVb84dtwlc= | ||
| resolved "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.2.tgz" | ||
| integrity sha1-WauT8yLvs89JFm1OLoEnicMRdCg= | ||
|
|
||
| "@vscode/vsce-sign@^2.0.0": | ||
| version "2.0.5" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the blank line 88 before the comment. According to the .editorconfig formatting guidelines, unnecessary blank lines should be avoided within test method bodies.