Fix missing password in Connection pane for Server connections with remembered passwords (#21813)

* Fix missing password in Connection pane

* Get saved password for SQL login default auth type

* Clean up

* Fix build hygiene errors

* Captures input

* Add timeout waiting for all promises to resolve

* Add missing semicolon

* Code review feedback

* Minor clean up

* Code review feedback

* Improved error messaging

* Update src/sql/workbench/services/connection/browser/connectionDialogService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* Improves UX around loading passwords

* Remove unused import

* Uses await instead of promise chaining.

* Removes async

* Revert back to resolving password promise.

* Asserts controller map and model have values.

---------

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Lewis Sanchez
2023-02-14 20:49:55 -08:00
committed by GitHub
parent a683b1b777
commit d9b24522e5
3 changed files with 44 additions and 12 deletions

View File

@@ -306,9 +306,16 @@ suite('ConnectionDialogService tests', () => {
mockWidget.setup(x => x.fillInConnectionInputs(TypeMoq.It.isAny())).returns(() => {
called = true;
});
await connectionDialogService.showDialog(mockConnectionManagementService.object, testConnectionParams, connectionProfile);
await (connectionDialogService as any).handleFillInConnectionInputs(connectionProfile);
let returnedModel = ((connectionDialogService as any)._connectionControllerMap['MSSQL'] as any)._model;
let connectionControllerMap = (connectionDialogService as any)._connectionControllerMap;
assert(!!connectionControllerMap);
let returnedModel = (connectionControllerMap['MSSQL'] as any)._model;
assert(!!returnedModel);
assert.strictEqual(returnedModel._groupName, 'testGroup');
assert(called);
});